May 2020
Intermediate to advanced
530 pages
17h 8m
English
Shogun is an open source ML library that provides a wide range of unified ML algorithms. The Shogun library has the CLinearRidgeRegression class for solving simple linear regression problems. This class solves problems with standard Cholesky matrix decomposition in a noniterative way, as illustrated in the following code block:
auto x = some<CDenseFeatures<float64_t>>(x_values);auto y= some<CRegressionLabels>(y_values); // real-valued labelsfloat64_t tau_regularization = 0.0001;auto lr = some<CLinearRidgeRegression>(tau_regularization, nullptr, nullptr); // regression model with regularizationlr->set_labels(y);r->train(x)
For new x inputs, we can predict new y values in the following way:
auto new_x ...
Read now
Unlock full access