17#include "taskflow/taskflow.hpp"
19#include <taskflow/algorithm/for_each.hpp>
30template <ProgramType T>
94 template <ProgramType P = T>
97 template <ProgramType P = T>
115 template <ProgramType P = T>
118 template <ProgramType P = T>
void bind_engine(py::module &m, string name)
holds variable type data.
The Engine class represents the core engine of the brush library.
Selection< T > selector
selection algorithm
auto predict(const Dataset &data)
Timer timer
start time of training
bool is_fitted
keeps track of whether fit was called.
Engine(const Parameters &p=Parameters())
auto predict_proba(const Dataset &d)
void print_progress(float percentage)
void run(Dataset &d)
train the model
Engine< T > & fit(Dataset &data)
Log_Stats stats
runtime stats
Archive< T > archive
pareto front archive
Population< T > pop
population of programs
auto predict(const Ref< const ArrayXXf > &X)
Selection< T > survivor
survival algorithm
Variation< T > variator
variation operators
Parameters & get_params()
Individual< T > & get_best_ind()
void set_params(Parameters &p)
auto predict_proba(const Ref< const ArrayXXf > &X)
void set_is_fitted(bool f)
set flag indicating whether fit has been called
int get_archive_size()
return archive size
bool update_best(const Dataset &data, bool val=false)
updates best score by searching in the population for the individual that best fits the given data
Evaluation< T > evaluator
evaluation code
Engine< T > & fit(const Ref< const ArrayXXf > &X, const Ref< const ArrayXf > &y)
Parameters params
hyperparameters of brush, which the user can interact
void init()
initialize Feat object for fitting.
auto predict_proba_archive(int id, const Dataset &data)
auto predict_archive(int id, const Dataset &data)
predict on unseen data from the archive
void log_stats(std::ofstream &log)
vector< json > get_archive(bool front)
return population as string
void print_stats(std::ofstream &log, float fraction)
Class for evaluating the fitness of individuals in a population.
Class representing the variation operators in Brush.
< nsga2 selection operator for getting the front
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Engine< PT::Regressor >, params, best_ind, archive)
Namespace containing scoring functions for evaluation metrics.
vector< string > feature_names
The Archive struct represents a collection of individual programs.
Holds a search space, consisting of operations and terminals and functions, and methods to sample tha...
interfaces with selection operators.