MACHINE LEARNING (ML) | QUICK REFERENCE GUIDE
Algorithm Examples
OneClassSVM... | fit OneClassSVM * kernel=“poly” nu=0.5 coef0=0.5 gamma=0.5 tol=1 degree=3 shrinking=f into TESTMODEL _ OneClassSVM
Preprocessing Preprocessing algorithms are used for preparing data and help with prediction accuracy.
Command Description Syntax
fit Fit and apply a machine learning model to search results.
... | fit algorithm y from x params into model _ name as output _ field
apply Apply a machine learning model that was learned using the fit command.
... | apply model _ name as output _ field
summary Return a summary of a machine learning model that was learned using the fit command.
| summary model _ name
listmodels Return a list of machine learning models that were learned using the fit command.
| listmodels
deletemodel Delete a machine learning model that was learned using the fit command.
| deletemodel model _ name
sample Randomly sample or partition events. ... | sample options by split _ by _ field
Algorithm Examples
FieldSelector... | fit FieldSelector type=categorical SLA _ violation from *
PCA ... | fit PCA * k=3
KernelPCA ... | fit KernelPCA * k=3 gamma=0.001
TFIDF... | fit TFIDF Reviews into user _feedback _ model max _ def=0.6 min _ def=0.2
Algorithm Examples
StandardScaler ... | fit StandardScaler *
Machine Learning ToolkitUse this document for a quick list of ML search commands as well as some tips on the more widely used algorithms from the Machine Learning Toolkit.
Search Commands for Machine Learning
The Machine Learning Toolkit provides custom search commands for applying machine learning to your data.
Feature Extraction
Feature extraction algorithms transform fields for better prediction accuracy.
Algorithm Examples
KMeans ... | fit KMeans * k=3
DBSCAN ... | fit DBSCAN *
BIRCH ... | fit Birch * k=3
SpectralClustering ... | fit SpectralClustering * k=3
Cluster Numeric
Partition events with multiple numeric fields into clusters.
Forecasting Forecast future values given past values of a metric (numeric time series).
Algorithm Examples
ARIMA ... | fit ARIMA Voltage order=4-0-1
Anomaly Detection Find events that contain unusual combinations of values.
FREQUENTLY USED ALGORITHMS
Download Machine Learning Toolkit. Read the Machine Learning Documentation.
© 2017 Splunk Inc. All rights reserved. Splunk, Splunk>, Listen to Your Data, The Engine for Machine Data, Splunk Cloud, Splunk Light and SPL are trademarks and registered trademarks of Splunk Inc. in the United States and other countries. All other brand names, product names, or trademarks belong to their respective owners. GDE-Splunk-MachineLearning-QuickRefGuide-102
MACHINE LEARNING (ML) | QUICK REFERENCE GUIDE
docs.splunk.com
Predict Numeric Predict the value of a numeric field using the values of other fields in that event.
Algorithm Examples
LinearRegression ... | fit LinearRegression temperature from date _ month date _ hour into temperature _ model
Lasso ... | fit Lasso temperature from date _ month date _ hour
Ridge ... | fit Ridge temperature from date _ month date _ hour normalize=true alpha=0.5
ElasticNet ... | fit ElasticNet temperature from date _ month date _ hour normalize=true alpha=0.5
KernelRidge ... | fit KernelRidge temperature from date _ month date _ hour into temperature _ model
SGDRegressor ... | fit SGDRegressor temperature from date _ month date _ hour into temperature _ model
DecisionTreeRegressor ... | fit DecisionTreeRegressor temperature from date _ month date _ hour into temperature _ model
RandomForestRegressor ... | fit RandomForestRegressor temperature from date _ month date _ hour into temperature _ model
Predict Categorical Predict the value of a categorical field using the values of other fields in that event.
Algorithm Examples
LogisticRegression ... | fit LogisticRegression SLA _ violation from IO _ wait _ time into sla _ model
SVM ... | fit SVM SLA _ violation from * into sla _ model
BernoulliNB ... | fit BernoulliNB type from * into TESTMODEL _ BernoulliNB alpha=0.5 binarize=0 fit _ prior=f
GaussianNB ... | fit GaussianNB species from * into TESTMODEL _ GaussianNB
SGDClassifier ... | fit SGDClassifier SLA _ violation from * into sla _ model
DecisionTreeClassifier ... | fit DecisionTreeClassifier SLA _ violation from * into sla _ model
RandomForestClassifier ... | fit RandomForestClassifier SLA _ violation from * into sla _ model
Predict Numeric Fields (Regression)
LinearRegressionLassoRidgeElasticNetKernelRidgeSGDRegressorDecisionTreeRegressorRandomForestRegressor
Forecast Numeric Time Series
ARIMAKalmanFilter (use predict command)ACF (autocorrelation function)PACF (partial autocorrelation function)
Cluster Numeric Events
KMeansDBSCANBIRCHSpectralClustering
Feature Extraction
FieldSelectorPCAKernelPCATFIDF
Preprocessing
StandardScaler
Detect Categorical Outliers
OneClassSVManomalydetection (command)
Detect Numeric Outliers
OneClassSVMstreamstats, median, mean, p25, p75
Predict Categorical Fields (Classification)
LogisticRegressionSVMBernoulliNBGaussianNBSGDClassifierDecisionTreeClassifierRandomForestClassifier
Start
Predict a Field Value
Prepare DataGroup Events
Forecast Future Values
Numeric Categorical
Detect Outliers