jubatus_core  0.1.2
Jubatus: Online machine learning framework for distributed environment
Classes | Typedefs | Functions
jubatus::core::unlearner Namespace Reference

Classes

class  lru_unlearner
 
class  mock_callback
 
class  random_unlearner
 
class  unlearner_base
 

Typedefs

typedef jubatus::util::lang::function< void(std::string)> unlearning_callback
 

Functions

shared_ptr< unlearner_basecreate_unlearner (const std::string &name, const common::jsonconfig::config &config)
 

Typedef Documentation

typedef jubatus::util::lang::function<void (std::string)> jubatus::core::unlearner::unlearning_callback

Definition at line 27 of file unlearner_base.hpp.

Function Documentation

util::lang::shared_ptr< unlearner_base > jubatus::core::unlearner::create_unlearner ( const std::string &  name,
const common::jsonconfig::config config 
)

Definition at line 31 of file unlearner_factory.cpp.

References jubatus::core::common::jsonconfig::config_cast_check(), and JUBATUS_EXCEPTION.

Referenced by jubatus::core::anomaly::anomaly_factory::create_anomaly(), jubatus::core::classifier::classifier_factory::create_classifier(), and jubatus::core::recommender::recommender_factory::create_recommender().

33  {
34  if (name == "lru") {
35  return shared_ptr<unlearner_base>(
36  new lru_unlearner(common::jsonconfig::config_cast_check<
37  lru_unlearner::config>(config)));
38  } else if (name == "random") {
39  return shared_ptr<unlearner_base>(
40  new random_unlearner(common::jsonconfig::config_cast_check<
41  random_unlearner::config>(config)));
42  } else {
43  throw JUBATUS_EXCEPTION(common::unsupported_method(
44  "unlearner(" + name + ')'));
45  }
46 }
T config_cast_check(const config &c)
Definition: cast.hpp:311
#define JUBATUS_EXCEPTION(e)
Definition: exception.hpp:79

Here is the call graph for this function:

Here is the caller graph for this function: