All Apps and Add-ons

Can we update the existing model of Machine Learning in Splunk

nasrinmulani
New Member

Hi All,

I wanted to know can i update the existing model in splunk machine learning toolkit.
If yes, how to do it?

0 Karma
1 Solution

aoliner_splunk
Splunk Employee
Splunk Employee

Hi there,

Some algorithms support an argument called "partial_fit" that allows you to update an existing model. Quoting from the docs:

"The partial_fit parameter controls whether an existing model should be incrementally updated or not (default is "false"). This allows you to update an existing model using only new data without having to retrain it on the full training data set.

Example using partial_fit:

| inputlookup iris.csv | fit GaussianNB species from * partial_fit=true into My_Incremental_Model

In the example above, if My_Incremental_Model does not exist, the model is saved to it. If My_Incremental_Model exists and was trained using GaussianNB, the command updates the existing model with the new input. If My_Incremental_Model exists but was not trained by GaussianNB, an error message will be given. If partial_fit=false or partial_fit is not specified (default is false), the model specified is created and replaces the pre-trained model if one exists."

You can search for "partial_fit" on the following page to see which algorithms support it:
http://docs.splunk.com/Documentation/MLApp/3.2.0/User/Algorithms

View solution in original post

0 Karma

aoliner_splunk
Splunk Employee
Splunk Employee

Hi there,

Some algorithms support an argument called "partial_fit" that allows you to update an existing model. Quoting from the docs:

"The partial_fit parameter controls whether an existing model should be incrementally updated or not (default is "false"). This allows you to update an existing model using only new data without having to retrain it on the full training data set.

Example using partial_fit:

| inputlookup iris.csv | fit GaussianNB species from * partial_fit=true into My_Incremental_Model

In the example above, if My_Incremental_Model does not exist, the model is saved to it. If My_Incremental_Model exists and was trained using GaussianNB, the command updates the existing model with the new input. If My_Incremental_Model exists but was not trained by GaussianNB, an error message will be given. If partial_fit=false or partial_fit is not specified (default is false), the model specified is created and replaces the pre-trained model if one exists."

You can search for "partial_fit" on the following page to see which algorithms support it:
http://docs.splunk.com/Documentation/MLApp/3.2.0/User/Algorithms

0 Karma

nasrinmulani
New Member

Thanks Aoliner,

It was really helpful , but i think it's not available for algorithm which i have used (Random Forest Regressor)

0 Karma

aoliner_splunk
Splunk Employee
Splunk Employee

You can, of course, simply overwrite the old model with a new model using new data, but you'll have to pay the full cost of building that new model from scratch.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...