recommender::recommender(
    shared_ptr<core::recommender::recommender_base> recommender_method,
    shared_ptr<fv_converter::datum_to_fv_converter> converter)
    : converter_(converter),
      recommender_(recommender_method),
      wm_(mixable_weight_manager::model_ptr(new weight_manager)) {
  register_mixable(recommender_->get_mixable());
  register_mixable(&wm_);

  converter_->set_weight_manager(wm_.get_model());
}
Exemple #2
0
classifier_serv::classifier_serv(const framework::server_argv& a)
  :framework::jubatus_serv(a)
{
  clsfer_.set_model(make_model());
  register_mixable(framework::mixable_cast(&clsfer_));

  wm_.wm_ = common::cshared_ptr<fv_converter::weight_manager>(new weight_manager);
  wm_.set_model(wm_.wm_);

  register_mixable(framework::mixable_cast(&wm_));
}
Exemple #3
0
anomaly::anomaly(
    shared_ptr<jubatus::core::anomaly::anomaly_base> anomaly_method,
    shared_ptr<fv_converter::datum_to_fv_converter> converter)
    : converter_(converter),
      anomaly_(anomaly_method),
      wm_(mixable_weight_manager::model_ptr(new weight_manager)) {
  vector<framework::mixable*> mixables = anomaly_->get_mixables();
  for (size_t i = 0; i < mixables.size(); i++) {
    register_mixable(mixables[i]);
  }
  register_mixable(&wm_);
}
Exemple #4
0
regression::regression(
    shared_ptr<core::regression::regression_base> regression_method,
    shared_ptr<fv_converter::datum_to_fv_converter> converter)
    : converter_(converter)
    , regression_(regression_method)
    , wm_(mixable_weight_manager::model_ptr(new weight_manager)) {
  std::vector<framework::mixable*> mixables = regression_->get_mixables();
  for (size_t i = 0; i < mixables.size(); i++) {
    register_mixable(mixables[i]);
  }
  register_mixable(&wm_);

  converter_->set_weight_manager(wm_.get_model());
}
Exemple #5
0
graph_serv::graph_serv(const framework::server_argv& a)
  : jubatus_serv(a)
{
  common::cshared_ptr<jubatus::graph::graph_base> 
    g(jubatus::graph::create_graph("graph_wo_index"));
  g_.set_model(g);
  register_mixable(mixable_cast(&g_));
}
nearest_neighbor::nearest_neighbor(
    shared_ptr<core::nearest_neighbor::nearest_neighbor_base> nn,
    shared_ptr<fv_converter::datum_to_fv_converter> converter,
    shared_ptr<unlearner::unlearner_base> unlearner)
    : converter_(converter),
      nn_(nn),
      unlearner_(unlearner) {
  register_mixable(nn_->get_mixable());
  unlearner->set_callback(table::row_deleter(nn_->get_table()));
}
nearest_neighbor::nearest_neighbor(
    shared_ptr<core::nearest_neighbor::nearest_neighbor_base> nn,
    shared_ptr<fv_converter::datum_to_fv_converter> converter)
    : converter_(converter),
      nn_(nn) {
  register_mixable(nn_->get_mixable());
  // We cannot register mixables of fv converter, because mixable_weight_manager
  // does not support mixing with push_mixer.
  // TODO(beam2d): Support mixing weight manager with push_mixer and register
  // mixables of fv converter here.
}
Exemple #8
0
recommender_serv::recommender_serv(const framework::server_argv& a)
  :jubatus_serv(a, a.tmpdir)
{
  //  rcmdr_.set_model(make_model()); -> we'd have to make it safer
  register_mixable(mixable_cast(&rcmdr_));
}
regression_serv::regression_serv(const framework::server_argv & a)
  :jubatus_serv(a)
{
  gresser_.set_model(make_model());
  register_mixable(framework::mixable_cast(&gresser_));
}
 my_string_driver() : string_(shared_ptr<my_string>(new my_string)) {
   register_mixable(&string_);
 }