Using the rxLinMod function and finishing the model

Let's explore the R script more. The model is calculated with the rxLinMod function, which has at least two parameters: the predictive formula and the training dataset. The result of the function will be saved into the Models.ModelVersions table later. We also want to see the quality of the model. The preceding R script uses a very simple method. It calculates a set of predictions using the rxPredict function with parameters of trained models and the testing dataset, and then it adds predicted values back to a testing dataset as a new column. The last line of preceding code returns the testing dataset with the predicted values, and we can compare the accuracy of the estimations. The following ...

Get Hands-On Data Science with SQL Server 2017 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.