As discussed in previous chapters, evaluating a model is a critical part of the overall model building process. A poorly trained model will only provide inaccurate predictions. Fortunately, ML.NET provides many popular attributes to calculate model accuracy based on a test set at the time of training to give you an idea of how well your model will perform in a production environment.
In ML.NET, as noted earlier in the linear regression sample application, there are five properties that comprise the RegressionMetrics class object. These include the following:
- Loss function
- Mean absolute error
- Mean squared error
- R-squared
- Root mean squared error
In the next sections, we will break down how these values are calculated and ideal values to look for.
Loss function
This property uses the loss function set when the regression trainer was initialized. In the case of our linear regression example application, we used the default constructor, which for SDCA is defaulted...