Vowpal Wabbit
noop.cc
Go to the documentation of this file.
1 /*
2 Copyright (c) by respective owners including Yahoo!, Microsoft, and
3 individual contributors. All rights reserved. Released under a BSD (revised)
4 license as described in the file LICENSE.
5  */
6 // This is a learner which does nothing with examples. Used when VW is used as a compressor.
7 
8 #include "reductions.h"
9 
10 using namespace VW::config;
11 
13 
15 {
16  bool noop = false;
17  option_group_definition new_options("Noop Learner");
18  new_options.add(make_option("noop", noop).keep().help("do no learning"));
19  options.add_and_parse(new_options);
20 
21  if (!noop)
22  return nullptr;
23 
25 }
LEARNER::base_learner * noop_setup(options_i &options, vw &)
Definition: noop.cc:14
base_learner * make_base(learner< T, E > &base)
Definition: learner.h:462
virtual void add_and_parse(const option_group_definition &group)=0
void learn(char &, LEARNER::base_learner &, example &)
Definition: noop.cc:12
learner< T, E > & init_learner(free_ptr< T > &dat, L *base, void(*learn)(T &, L &, E &), void(*predict)(T &, L &, E &), size_t ws, prediction_type::prediction_type_t pred_type)
Definition: learner.h:369
option_group_definition & add(T &&op)
Definition: options.h:90
typed_option< T > make_option(std::string name, T &location)
Definition: options.h:80
void noop(void *)
Definition: learner.h:102