658 auto poly = scoped_calloc_or_throw<stagewise_poly>();
659 bool stage_poly =
false;
661 new_options.add(
make_option(
"stage_poly", stage_poly).keep().help(
"use stagewise polynomial feature learning"))
662 .add(
make_option(
"sched_exponent", poly->sched_exponent)
664 .help(
"exponent controlling quantity of included features"))
667 .help(
"multiplier on batch size before including more features"))
668 .
add(
make_option(
"batch_sz_no_doubling", poly->batch_sz_double).help(
"batch_sz does not double"));
669 #ifdef MAGIC_ARGUMENT 671 make_typed_option(
"magic_argument", poly->magic_argument).default_value(0.).help(
"magical feature flag"));
672 #endif // MAGIC_ARGUMENT 682 poly->batch_sz_double = !poly->batch_sz_double;
684 poly->sum_sparsity = 0;
685 poly->sum_input_sparsity = 0;
686 poly->num_examples = 0;
687 poly->sum_sparsity_sync = 0;
688 poly->sum_input_sparsity_sync = 0;
689 poly->num_examples_sync = 0;
690 poly->last_example_counter = -1;
692 poly->update_support =
false;
693 poly->original_ec =
nullptr;
694 poly->next_batch_sz = poly->batch_sz;
void finish_example(vw &all, stagewise_poly &poly, example &ec)
void sort_data_create(stagewise_poly &poly)
base_learner * make_base(learner< T, E > &base)
virtual void add_and_parse(const option_group_definition &group)=0
void set_save_load(void(*sl)(T &, io_buf &, bool, bool))
single_learner * as_singleline(learner< T, E > *l)
void set_finish_example(void(*f)(vw &all, T &, E &))
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)
void save_load(stagewise_poly &poly, io_buf &model_file, bool read, bool text)
int add(svm_params ¶ms, svm_example *fec)
typed_option< T > make_option(std::string name, T &location)
void set_end_pass(void(*f)(T &))
LEARNER::base_learner * setup_base(options_i &options, vw &all)
void depthsbits_create(stagewise_poly &poly)
void end_pass(stagewise_poly &poly)
void learn(stagewise_poly &poly, single_learner &base, example &ec)
void predict(stagewise_poly &poly, single_learner &base, example &ec)