jubatus_core
0.1.2
Jubatus: Online machine learning framework for distributed environment
|
#include <light_lof.hpp>
Classes | |
struct | config |
struct | parameter |
Public Member Functions | |
float | calc_anomaly_score (const common::sfv_t &query) const |
float | calc_anomaly_score (const std::string &id) const |
void | clear () |
void | clear_row (const std::string &id) |
void | get_all_row_ids (std::vector< std::string > &ids) const |
std::vector< framework::mixable * > | get_mixables () const |
bool | is_updatable () const |
light_lof (const config &config, const std::string &id, jubatus::util::lang::shared_ptr< nearest_neighbor::nearest_neighbor_base > nearest_neighbor_engine) | |
light_lof (const config &config, const std::string &id, jubatus::util::lang::shared_ptr< nearest_neighbor::nearest_neighbor_base > nearest_neighbor_engine, jubatus::util::lang::shared_ptr< unlearner::unlearner_base > unlearner) | |
void | pack (framework::packer &packer) const |
void | set_row (const std::string &id, const common::sfv_t &sfv) |
std::string | type () const |
void | unpack (msgpack::object o) |
void | update_row (const std::string &id, const sfv_diff_t &diff) |
virtual | ~light_lof () |
Public Member Functions inherited from jubatus::core::anomaly::anomaly_base | |
anomaly_base () | |
uint64_t | find_max_int_id () const |
virtual | ~anomaly_base () |
Public Member Functions inherited from jubatus::core::framework::model | |
virtual | ~model () |
Private Member Functions | |
float | collect_lrds (const common::sfv_t &query, std::vector< float > &neighbor_lrds) const |
float | collect_lrds (const std::string &query, std::vector< float > &neighbor_lrds) const |
float | collect_lrds_from_neighbors (const std::vector< std::pair< std::string, float > > &neighbors, std::vector< float > &neighbor_lrd) const |
void | collect_neighbors (const std::string &query, jubatus::util::data::unordered_set< std::string > &neighbors) const |
parameter | get_row_parameter (const std::string &row) const |
void | touch (const std::string &id) |
void | unlearn (const std::string &id) |
void | update_entries (const jubatus::util::data::unordered_set< std::string > &neighbors) |
Private Attributes | |
config | config_ |
jubatus::util::lang::shared_ptr< framework::mixable_versioned_table > | mixable_nearest_neighbor_ |
jubatus::util::lang::shared_ptr< framework::mixable_versioned_table > | mixable_scores_ |
std::string | my_id_ |
jubatus::util::lang::shared_ptr< nearest_neighbor::nearest_neighbor_base > | nearest_neighbor_engine_ |
jubatus::util::lang::shared_ptr< unlearner::unlearner_base > | unlearner_ |
Definition at line 45 of file light_lof.hpp.
jubatus::core::anomaly::light_lof::light_lof | ( | const config & | config, |
const std::string & | id, | ||
jubatus::util::lang::shared_ptr< nearest_neighbor::nearest_neighbor_base > | nearest_neighbor_engine | ||
) |
jubatus::core::anomaly::light_lof::light_lof | ( | const config & | config, |
const std::string & | id, | ||
jubatus::util::lang::shared_ptr< nearest_neighbor::nearest_neighbor_base > | nearest_neighbor_engine, | ||
jubatus::util::lang::shared_ptr< unlearner::unlearner_base > | unlearner | ||
) |
|
virtual |
Definition at line 128 of file light_lof.cpp.
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 131 of file light_lof.cpp.
References collect_lrds().
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 138 of file light_lof.cpp.
References collect_lrds().
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 145 of file light_lof.cpp.
References mixable_scores_, nearest_neighbor_engine_, and unlearner_.
Referenced by unpack().
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 153 of file light_lof.cpp.
References JUBATUS_EXCEPTION.
|
private |
Definition at line 226 of file light_lof.cpp.
References collect_lrds_from_neighbors(), config_, nearest_neighbor_engine_, and jubatus::core::anomaly::light_lof::config::nearest_neighbor_num.
Referenced by calc_anomaly_score().
|
private |
Definition at line 236 of file light_lof.cpp.
References collect_lrds_from_neighbors(), config_, nearest_neighbor_engine_, jubatus::core::anomaly::light_lof::config::nearest_neighbor_num, and jubatus::core::clustering::swap().
|
private |
Definition at line 258 of file light_lof.cpp.
References get_row_parameter().
Referenced by collect_lrds().
|
private |
Definition at line 290 of file light_lof.cpp.
References config_, nearest_neighbor_engine_, and jubatus::core::anomaly::light_lof::config::reverse_nearest_neighbor_num.
Referenced by set_row(), and unlearn().
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 180 of file light_lof.cpp.
References nearest_neighbor_engine_.
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 188 of file light_lof.cpp.
References mixable_scores_, and nearest_neighbor_engine_.
|
private |
Definition at line 368 of file light_lof.cpp.
References JUBATUS_EXCEPTION, jubatus::core::anomaly::light_lof::parameter::kdist, jubatus::core::anomaly::light_lof::parameter::lrd, and mixable_scores_.
Referenced by collect_lrds_from_neighbors().
|
inlinevirtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 95 of file light_lof.hpp.
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 382 of file light_lof.cpp.
References mixable_scores_, and nearest_neighbor_engine_.
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 161 of file light_lof.cpp.
References collect_neighbors(), mixable_scores_, my_id_, nearest_neighbor_engine_, touch(), and update_entries().
|
private |
Definition at line 197 of file light_lof.cpp.
References JUBATUS_EXCEPTION, and unlearner_.
Referenced by set_row().
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 184 of file light_lof.cpp.
|
private |
Definition at line 215 of file light_lof.cpp.
References collect_neighbors(), mixable_nearest_neighbor_, mixable_scores_, and update_entries().
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 388 of file light_lof.cpp.
References clear(), mixable_scores_, and nearest_neighbor_engine_.
|
private |
Definition at line 302 of file light_lof.cpp.
References config_, mixable_scores_, my_id_, nearest_neighbor_engine_, jubatus::core::anomaly::light_lof::config::nearest_neighbor_num, and jubatus::core::storage::typed_column< T >::push_back().
Referenced by set_row(), and unlearn().
|
virtual |
Implements jubatus::core::anomaly::anomaly_base.
Definition at line 157 of file light_lof.cpp.
References JUBATUS_EXCEPTION.
|
private |
Definition at line 140 of file light_lof.hpp.
Referenced by collect_lrds(), collect_neighbors(), and update_entries().
|
private |
Definition at line 135 of file light_lof.hpp.
Referenced by unlearn().
|
private |
Definition at line 138 of file light_lof.hpp.
Referenced by clear(), get_mixables(), get_row_parameter(), pack(), set_row(), unlearn(), unpack(), and update_entries().
|
private |
Definition at line 141 of file light_lof.hpp.
Referenced by set_row(), and update_entries().
|
private |
Definition at line 130 of file light_lof.hpp.
Referenced by clear(), collect_lrds(), collect_neighbors(), get_all_row_ids(), get_mixables(), pack(), set_row(), unpack(), and update_entries().
|
private |
Definition at line 131 of file light_lof.hpp.