19 const std::function<Eigen::MatrixXd(Eigen::MatrixXd)> &transform_function)
22 auto X_trans = transform_function(
X);
34 Eigen::RowVectorXd concat_vector(1, feature_vector.cols() + 1);
35 concat_vector << 1, feature_vector;
49 out <<
"LinearModel ";
51 out <<
"with transformations ";
A model for predicting the costs of a physical operator.
unsigned num_features_
number of features this model expects pre-transformation
double predict_target(const Eigen::RowVectorXd &feature_vector) const
std::function< Eigen::MatrixXd(Eigen::MatrixXd)> transformation_
transformation that is applied on the feature matrix
LinearModel(Eigen::VectorXd coefficientVector)
Create a LinearModel instance given a coefficient vector.
Eigen::VectorXd coefficients_
vector of coefficients for every feature
Eigen::VectorXd regression_linear_closed_form(const Eigen::MatrixXd &X, const Eigen::VectorXd &y)
Use closed-form solution for linear regression.
M_LCOV_EXCL_START std::ostream & operator<<(std::ostream &out, const PlanTableBase< Actual > &PT)