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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...