7 #include "../eval/metrics.h"
8 #include "../model/ml.h"
32 shared_ptr<CLabels> min_yhat;
34 for (
int x = 0; x < this->
iters; x++)
39 bool anychanges =
false;
45 auto pd =
dynamic_cast<NodeDx*
>(p.get());
46 vector<float> W0 = pd->
W;
47 for (
int i = 0;
i < pd->W.size(); ++
i)
61 shared_ptr<CLabels> yhat = tmp.
fit(d, params, pass);
67 if (new_loss < min_loss)
data holding X, y, and Z data
std::map< string, callback > score_hash
shared_ptr< CLabels > run(Individual &ind, Data d, const Parameters ¶ms, bool &updated)
adapt weights
HillClimb(string scorer, int iters=1, float step=0.1)
individual programs in the population
string get_eqn()
return symbolic representation of program
void clone(Individual &cpy, bool sameid=true) const
clone this individual
float fitness
aggregate fitness score
NodeVector program
executable data structure
shared_ptr< CLabels > fit(const Data &d, const Parameters ¶ms, bool &pass)
fits an ML model to the data after transformation
string log(string m, int v, string sep="\n") const
print message with verbosity control.
VectorXf multi_log_loss(const VectorXf &y, const ArrayXXf &confidences, const vector< float > &class_weights)
multinomial log loss
VectorXf log_loss(const VectorXf &y, const VectorXf &yhat, const vector< float > &class_weights)
VectorXf squared_difference(const VectorXf &y, const VectorXf &yhat)
holds the hyperparameters for Feat.
vector< float > class_weights
weights for each class