25 model.
SetData(matrix, measured);
39 model.
SetData(matrix, measured);
49 return 2 * lambda * solved.lpNorm<1>() * measured.size();
54 return response * source;
59 return ( measured- predicted ).squaredNorm();
64 return ( measured - predicted ).norm() / measured.size();
double chi2(vector_t measured, vector_t predicted)
virtual void Setbeta(Eigen::VectorXd beta)
vector_t predict(matrix_t response, vector_t source)
vector_t solve(matrix_t response, vector_t measured, const Params ¶ms=Params(), vector_t source=Eigen::VectorXd(), vector_t weights=Eigen::VectorXd())
double mean_residual(vector_t measured, vector_t predicted)
void SetLambdaWeight(Eigen::VectorXd w)
double chi2_l1(vector_t measured, vector_t solved, double lambda=1.0)
Eigen::VectorXd & Getbeta()
virtual void SetData(Eigen::MatrixXd X, Eigen::VectorXd y)