How it works…

The implementation is very simple and easy to understand. The rxFastLinear() function is capable of implementing a classification model and regression model. In this example, the code is for a linear regression model. Usually, the type is determined by the type of the outcome variable, but it is always good to specify the type of model using the type argument.

The function takes a model formula as an input and the data source. All other arguments were evaluated at their default values. Since there were two factor variables, the ultimate model contains a lot more variables than the variable specified in the model formula. Each of the values of the ORIGIN and DEST variables is represented by a binary variable. The following is the default console output after a complete execution of the function:

    Automatically adding a MinMax normalization transform, 
use 'norm=Warn' or 'norm=No' to turn this behavior off.
Beginning read for block: 1
Rows Read: 5562425, Read Time: 0.36, Transform Time: 0
Beginning read for block: 2
No rows remaining. Finished reading data set.
Beginning read for block: 1
Rows Read: 5562425, Read Time: 0.291, Transform Time: 0
Beginning read for block: 2
Beginning read for block: 1
Rows Read: 5562425, Read Time: 0.295, Transform Time: 0
Beginning read for block: 2
No rows remaining. Finished reading data set.
Using 2 threads to train.
Automatically choosing a check frequency of 2.
Warning: Skipped 81469 instances with missing features/label
during training
Auto-tuning parameters: maxIterations = 2.
Auto-tuning parameters: L2 = 1E-06.
Auto-tuning parameters: L1Threshold (L1/L2) = 0.25.
Using model from last iteration.
Not training a calibrator because it is not needed.
Elapsed time: 00:00:14.6034061
Elapsed time: 00:00:00.1922793

Once the model is built, you can perform a prediction and extract other information as required.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset