datatable.models.Ftrl¶
This class implements the Follow the Regularized Leader (FTRL) model, that is based on the FTRL-Proximal online learning algorithm for binomial logistic regression. Multinomial classification and regression for continuous targets are also implemented, though these implementations are experimental. This model is fully parallel and is based on the Hogwild approach for parallelization.
The model supports numerical (boolean, integer and float types), temporal (date and time types) and string features. To vectorize features a hashing trick is employed, such that all the values are hashed with the 64-bit hashing function. This function is implemented as follows:
for booleans and integers the hashing function is essentially an identity function;
for floats the hashing function trims mantissa, taking into account
mantissa_nbits
, and interprets the resulting bit representation as a 64-bit unsigned integer;for date and time types the hashing function is essentially an identity function that is based on their internal integer representations;
for strings the 64-bit Murmur2 hashing function is used.
To compute the final hash x
the Murmur2 hashed feature name is added
to the hashed feature and the result is modulo divided by the number of
requested bins, i.e. by nbins
.
For each hashed row of data, according to Ad Click Prediction: a View from the Trenches, the following FTRL-Proximal algorithm is employed:

When trained, the model can be used to make predictions, or it can be re-trained on new datasets as many times as needed improving model weights from run to run.
Construction¶
Construct an |
Methods¶
Properties¶
\(\alpha\) in per-coordinate FTRL-Proximal algorithm. |
|
\(\beta\) in per-coordinate FTRL-Proximal algorithm. |
|
Column names of the training frame, i.e. features. |
|
Hashes of the column names. |
|
An option to control precision of the internal computations. |
|
Feature importances calculated during training. |
|
Feature interactions. |
|
Classification labels. |
|
L1 regularization parameter, \(\lambda_1\) in per-coordinate FTRL-Proximal algorithm. |
|
L2 regularization parameter, \(\lambda_2\) in per-coordinate FTRL-Proximal algorithm. |
|
Number of mantissa bits for hashing floats. |
|
The model’s |
|
A model type |
|
A model type |
|
Number of bins for the hashing trick. |
|
An option to indicate if the “negative” class should be a created for multinomial classification. |
|
Number of training epochs. |
|
All the input model parameters as a named tuple. |