Algorithms
FieldSelector
The FieldSelector algorithm uses the scikit-learn GenericUnivariateSelect to select the best predictor fields based on univariate statistical tests. For descriptions of the `mode` and `param` parameters, see the scikit-learn documentatio…
The FieldSelector algorithm uses the scikit-learn GenericUnivariateSelect to select the best predictor fields based on univariate statistical tests. For descriptions of the mode and param parameters, see the scikit-learn documentation at http://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.GenericUnivariateSelect.html.
Parameters
The type parameter specifies if the field to predict is categorical or numeric.
Syntax
fit FieldSelector <field_to_predict> from <explanatory_fields>
[into <model name>] [type=<categorical, numeric>]
[mode=<k_best, fpr, fdr, fwe, percentile>] [param=<int>]
You can save FieldSelector models using the into keyword and apply new data later using the apply command.
... | apply sla_model
You can inspect the model learned by FieldSelector with the summary command.
| summary sla_model
Example
The following example uses FieldSelector on a test set.
... | fit FieldSelector type=categorical SLA_violation from * into sla_model | ...
Local availability Permalink to this section
- Local class:
FieldSelector - Source file:
Splunk_ML_Toolkit/bin/algos/FieldSelector.py(in-repo pathSplunk_ML_Toolkit/bin/algos/FieldSelector.py) - algos.conf stanza:
[FieldSelector] - Class bases:
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: preprocessor).