6 #ifndef TURI_REGR_LINEAR_REGRESSION_OPT_INTERFACE_H_ 7 #define TURI_REGR_LINEAR_REGRESSION_OPT_INTERFACE_H_ 10 #include <ml/ml_data/ml_data.hpp> 14 #include <toolkits/supervised_learning/supervised_learning.hpp> 15 #include <toolkits/supervised_learning/standardization-inl.hpp> 16 #include <toolkits/supervised_learning/linear_regression.hpp> 19 #include <ml/optimization/optimization_interface.hpp> 26 namespace supervised {
51 std::shared_ptr<l2_rescaling>
scaler;
70 bool _feature_rescaling=
true);
122 std::vector<std::pair<std::string, size_t>>
131 std::vector<std::string>
get_status(
const DenseVector& coefs,
132 const std::vector<std::string>& stats);
145 gradient,
double & function_value,
const size_t mbStart = 0,
const size_t 158 hessian, DenseVector& gradient,
double & function_value);
170 const DenseVector& point, DenseVector& gradient,
double &function_value);
175 &point, DenseVector& gradient,
double & function_value,
const size_t 176 mbStart = 0,
const size_t mbSize = -1);
void init_feature_rescaling()
void compute_first_order_statistics(const DenseVector &point, DenseVector &gradient, double &function_value, const size_t mbStart=0, const size_t mbSize=-1)
void rescale_solution(DenseVector &coefs)
std::shared_ptr< l2_rescaling > scaler
linear_regression_opt_interface(const ml_data &_data, const ml_data &_valid_data, linear_regression &_model, bool _feature_rescaling=true)
std::vector< std::string > get_status(const DenseVector &coefs, const std::vector< std::string > &stats)
std::vector< std::pair< std::string, size_t > > get_status_header(const std::vector< std::string > &stat_names)
~linear_regression_opt_interface()
void compute_validation_first_order_statistics(const DenseVector &point, DenseVector &gradient, double &function_value)
size_t num_examples() const
size_t num_variables() const
void set_threads(size_t _n_threads)
void compute_second_order_statistics(const DenseVector &point, DenseMatrix &hessian, DenseVector &gradient, double &function_value)
size_t num_validation_examples() const