Fast batch prediction
As seen in the previous section, both the model training step and the prediction step call sp_execute_external_script
, which invokes the R process. Real-time scoring and native scoring allow you to do predictions without invoking an R process. Therefore, these scoring methods improve the performance of prediction operations.
In addition, real-time scoring and native scoring let you use a machine learning model without having to install R. As long as you obtain a pretrained model in a compatible format and save it in an SQL Server database, you can call prediction operations easily.
Prerequisites
- There is no prerequisite when using the
PREDICT
function in SQL Server 2017. More information aboutPREDICT
is covered in the Native scoring section later. sp_rxPredict
requires some additional steps, as outlined in Enable real-time scoring model at https://docs.microsoft.com/en-us/sql/advanced-analytics/r/how-to-do-realtime-scoring#bkmk_enableRtScoring.
- Currently, both real-time...