jubatus_core
0.1.2
Jubatus: Online machine learning framework for distributed environment
|
#include <keyword_weights.hpp>
Public Member Functions | |
void | add_weight (const std::string &key, float weight) |
void | clear () |
uint64_t | get_document_count () const |
size_t | get_document_frequency (const std::string &key) const |
float | get_user_weight (const std::string &key) const |
keyword_weights () | |
void | merge (const keyword_weights &w) |
MSGPACK_DEFINE (document_count_, document_frequencies_, weights_) | |
std::string | to_string () const |
void | update_document_frequency (const common::sfv_t &fv) |
Private Types | |
typedef jubatus::util::data::unordered_map< std::string, float > | weight_t |
Private Member Functions | |
double | get_global_weight (const std::string &key) const |
Private Attributes | |
uint64_t | document_count_ |
counter< std::string > | document_frequencies_ |
weight_t | weights_ |
Definition at line 30 of file keyword_weights.hpp.
|
private |
Definition at line 61 of file keyword_weights.hpp.
jubatus::core::fv_converter::keyword_weights::keyword_weights | ( | ) |
Definition at line 44 of file keyword_weights.cpp.
void jubatus::core::fv_converter::keyword_weights::add_weight | ( | const std::string & | key, |
float | weight | ||
) |
Definition at line 57 of file keyword_weights.cpp.
References weights_.
Referenced by jubatus::core::fv_converter::weight_manager::add_weight().
void jubatus::core::fv_converter::keyword_weights::clear | ( | ) |
Definition at line 78 of file keyword_weights.cpp.
References jubatus::core::fv_converter::counter< T >::clear(), document_count_, document_frequencies_, and weights_.
Referenced by jubatus::core::fv_converter::weight_manager::clear(), and jubatus::core::fv_converter::weight_manager::put_diff().
|
inline |
Definition at line 40 of file keyword_weights.hpp.
References document_count_.
Referenced by jubatus::core::fv_converter::weight_manager::get_document_count().
|
inline |
Definition at line 36 of file keyword_weights.hpp.
References document_frequencies_.
Referenced by jubatus::core::fv_converter::weight_manager::get_document_frequency().
|
private |
float jubatus::core::fv_converter::keyword_weights::get_user_weight | ( | const std::string & | key | ) | const |
Definition at line 61 of file keyword_weights.cpp.
References weights_.
Referenced by jubatus::core::fv_converter::weight_manager::get_user_weight().
void jubatus::core::fv_converter::keyword_weights::merge | ( | const keyword_weights & | w | ) |
Definition at line 70 of file keyword_weights.cpp.
References jubatus::core::fv_converter::counter< T >::add(), document_count_, document_frequencies_, and weights_.
Referenced by jubatus::core::fv_converter::versioned_weight_diff::merge(), jubatus::core::fv_converter::weight_manager::mix(), and jubatus::core::fv_converter::weight_manager::put_diff().
jubatus::core::fv_converter::keyword_weights::MSGPACK_DEFINE | ( | document_count_ | , |
document_frequencies_ | , | ||
weights_ | |||
) |
string jubatus::core::fv_converter::keyword_weights::to_string | ( | ) | const |
Definition at line 84 of file keyword_weights.cpp.
References document_count_, document_frequencies_, and weights_.
Referenced by jubatus::core::fv_converter::weight_manager::to_string().
void jubatus::core::fv_converter::keyword_weights::update_document_frequency | ( | const common::sfv_t & | fv | ) |
Definition at line 50 of file keyword_weights.cpp.
References document_count_, and document_frequencies_.
Referenced by jubatus::core::fv_converter::weight_manager::update_weight().
|
private |
Definition at line 59 of file keyword_weights.hpp.
Referenced by clear(), get_document_count(), merge(), to_string(), and update_document_frequency().
|
private |
Definition at line 60 of file keyword_weights.hpp.
Referenced by clear(), get_document_frequency(), merge(), to_string(), and update_document_frequency().
|
private |
Definition at line 62 of file keyword_weights.hpp.
Referenced by add_weight(), clear(), get_user_weight(), merge(), and to_string().