Optimizing the Redshift models’ accuracy
In this section, we will review best practices for maintaining the optimal accuracy of your models.
You will need to continually monitor your models over time to ensure the scores stay stable between model training runs. Consider the new version of the model we created here:
Figure 13.4 – New model output
Create a table similar to this and track each week’s mean square error (MSE) score from the SHOW
MODEL
output:
CREATE TABLE chapter13.model_score_history ( Â Â Â Â model_name character varying(500), Â Â Â Â schema_name character varying(500), Â Â Â Â score integer, Â Â Â Â variance integer, Â Â Â Â training_date date ) DISTSTYLE AUTO;
The variance will be the difference in the score of each successive version of a model.
Check how your models are trending by writing a query like this:
Select model_name...