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 Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...