Fine-Tune the Classification Model
In this example, we again use our sample PostgreSQL database.
First, we create and train the model using a subset of the customer_churn
data, considering only female customers.
On execution, we get:
We can check its status using this command:
Once the status is complete, we can query for predictions.
On execution, we get:
Let’s adjust this model with more training data. Now we also consider male customers.
While the model is being generated and trained, it is not active. The model becomes active only after it completes generating and training.
To check the status and versions of the model, run this command:
On execution, we get:
Alternatively, use the DESCRIBE
command as below:
Let’s query for a prediction again.
On execution, we get:
Here after adjusting the model, there are no significant changes to the predictions. However, the probability class for Yes
and No
values has been updated. The probability of a Yes
value has increased slightly, while the probability of a No
value has decreased.
If you have dynamic data that gets updated regularly, you can set up an automated fine-tuning as below.
Note that the data source must contain an incremental column, such as timestamp or integer, so MindsDB can pick up only the recently added data with the help of the LAST
keyword.
Here is how to create and schedule a job to fine-tune the model periodically.
Now your model will be fine-tuned with newly added data every day or every time there is new data available.
Was this page helpful?