Algorithms
Ridge
\\
The Ridge algorithm uses the scikit-learn Ridge estimator to fit a model to predict the value of numeric fields. Ridge is like LinearRegression, but it uses L2 regularization to learn a linear models with smaller coefficients, making the algorithm more robust to collinearity. The kfold cross-validation command can be used with Ridge. See, K-fold_cross-validation.
For descriptions of the fit_intercept, normalize, and alpha parameters, see the scikit-learn documentation at http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Ridge.html.
Parameters
The alpha parameter specifies the degree of regularization. The default value is 1.0.
Syntax
fit Ridge <field_to_predict> from <explanatory_fields>
[into <model name>] [fit_intercept=<true|false>] [normalize=<true|false>]
[alpha=<int>]
You can save Ridge models using the into keyword and apply new data later using the apply command.
... | apply temperature_model
You can inspect the coefficients learned by Ridge with the summary command.
... | summary temperature_model
Example
The following example uses Ridge on a test set.
... | fit Ridge temperature from date_month date_hour normalize=true alpha=0.5 | ...
Local availability Permalink to this section
- Local class:
Ridge - Source file:
Splunk_ML_Toolkit/bin/algos/Ridge.py(in-repo pathSplunk_ML_Toolkit/bin/algos/Ridge.py) - algos.conf stanza:
[Ridge] - Class bases:
RegressorMixin,BaseAlgo
Source Permalink to this section
Adapted from the Splunk AI Toolkit 5.6.4 documentation at /en/splunk-cloud-platform/apply-machine-learning/use-ai-toolkit/5.6.4/algorithms-and-scoring-metrics-in-the-ai-toolkit/algorithms-in-the-ai-toolkit (section: regressor).