Ftrl¶
-
class
datatable.models.
Ftrl
¶ Follow the Regularized Leader (FTRL) model with hashing trick.
See this reference for more details: https://www.eecs.tufts.edu/~dsculley/papers/ad-click-prediction.pdf
Parameters: - alpha (float) – alpha in per-coordinate learning rate formula.
- beta (float) – beta in per-coordinate learning rate formula.
- lambda1 (float) – L1 regularization parameter.
- lambda2 (float) – L2 regularization parameter.
- nbins (int) – Number of bins to be used after the hashing trick.
- nepochs (int) – Number of epochs to train for.
- interactions (bool) – Switch to enable second order feature interactions.
-
alpha
¶ alpha in per-coordinate FTRL-Proximal algorithm
-
beta
¶ beta in per-coordinate FTRL-Proximal algorithm
-
colname_hashes
¶ Column name hashes
-
feature_importances
¶ One-column frame with the overall weight contributions calculated feature-wise during training and predicting. It can be interpreted as a feature importance information.
-
fit
()¶ Train an FTRL model on a dataset.
Parameters: Returns: Return type: None
-
interactions
¶ Switch to enable second order feature interactions
-
labels
¶ List of labels for multinomial regression.
-
lambda1
¶ L1 regularization parameter
-
lambda2
¶ L2 regularization parameter
-
model
¶ Tuple of model frames. Each frame has two columns, i.e. z and n, and nbins rows, where nbins is a number of bins for the hashing trick. Both column types are float64.
-
nbins
¶ Number of bins to be used for the hashing trick
-
nepochs
¶ Number of epochs to train a model
-
params
¶ FTRL model parameters
-
predict
()¶ Make predictions for a dataset.
Parameters: X (Frame) – Frame of shape (nrows, ncols) to make predictions for. It must have the same number of columns as the training frame. Returns: - A new frame of shape (nrows, 1) with the predicted probability
- for each row of frame X.
-
reset
()¶ Reset FTRL model and feature importance information, i.e. initialize model and importance frames with zeros.
Parameters: None – Returns: Return type: None