Algorithms
LogisticRegression
The LogisticRegression algorithm uses the scikit-learn LogisticRegression estimator to fit a model to predict the value of categorical fields.
The LogisticRegression algorithm uses the scikit-learn LogisticRegression estimator to fit a model to predict the value of categorical fields.
Parameters
- The
fit_interceptparameter specifies whether the model includes an implicit intercept term. - The default value of the
fit_interceptparameter is True. - The
probabilitiesparameter specifies whether probabilities for each possible field value should be returned alongside the predicted value. - The default value of the
probabilitiesparameter is False.
Syntax
fit LogisticRegression <field_to_predict> from <explanatory_fields> [into <model name>]
[fit_intercept=<true|false>] [probabilities=<true|false>]
You can save LogisticRegression models using the into keyword and apply new data later using the apply command.
... | apply sla_model
You can inspect the coefficients learned by LogisticRegression with the summary command.
... | summary sla_model
Example
The following examples uses LogisticRegression on a test set.
... | fit LogisticRegression SLA_violation from IO_wait_time into sla_model | ...
Local availability Permalink to this section
- Local class:
LogisticRegression - Source file:
Splunk_ML_Toolkit/bin/algos/LogisticRegression.py(in-repo pathSplunk_ML_Toolkit/bin/algos/LogisticRegression.py) - algos.conf stanza:
[LogisticRegression] - Class bases:
ClassifierMixin,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: classifier).