All Apps and Add-ons

Clarification on how fit/predict work together?

winknotes
Path Finder

I think I have a conceptual problem understanding these two commands but in my mind you'd build a model with fit and somehow use that model to forecast (predict) future events right?  But for the life of me I can't find any examples of this in practice.  To see it in pseudo-SPL might be something like this:

 

 

| mstats avg(some_metric) avg(some_other_metric) avg(yet_another_metric) WHERE index = my_index span=1d
| table some_metric some_other_metric yet_another_metric _time
| fit Ridge some_metric from some_other_metric yet_another_metric into my_model
| predict some_metric as prediction 

 

 

I guess everything I read and examples I see treat fit and predict as exclusive commands.  So I guess I have a couple questions.  

What's the point of a model created with fit?  
Do fit and predict work together to forecast?  

Thank you to anyone who can clear up my thinking on this.   

Labels (1)
0 Karma
1 Solution

skoelpin
SplunkTrust
SplunkTrust

The `fit` command is used to create a new model. This can be used for regression, classification, clustering etc.. Once a model is created with `fit`, you can then use that model with the `apply` command. The `predict` command does not require either the `fit` or the `apply` command as it works out of box. The `predict` command is used more for linear regression problems where you would find the slope and extrapolate out into the future. 

View solution in original post

0 Karma

skoelpin
SplunkTrust
SplunkTrust

The `fit` command is used to create a new model. This can be used for regression, classification, clustering etc.. Once a model is created with `fit`, you can then use that model with the `apply` command. The `predict` command does not require either the `fit` or the `apply` command as it works out of box. The `predict` command is used more for linear regression problems where you would find the slope and extrapolate out into the future. 

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...