Tabnet model
Fits the TabNet: Attentive Interpretable Tabular Learning model
tabnet_fit(x, ...) ## Default S3 method: tabnet_fit(x, ...) ## S3 method for class 'data.frame' tabnet_fit(x, y, ...) ## S3 method for class 'formula' tabnet_fit(formula, data, ...) ## S3 method for class 'recipe' tabnet_fit(x, data, ...)
x |
Depending on the context:
The predictor data should be standardized (e.g. centered or scaled). The model treats categorical predictors internally thus, you don't need to make any treatment. |
... |
Model hyperparameters. See |
y |
When
|
formula |
A formula specifying the outcome terms on the left-hand side, and the predictor terms on the right-hand side. |
data |
When a recipe or formula is used,
|
A TabNet model object. It can be used for serialization and predictions.
TabNet uses torch
as it's backend for computation and torch
uses all
available threads by default.
You can control the number of threads used by torch
with:
torch::torch_set_num_threads(1) torch::torch_set_num_interop_threads(1)
if (torch::torch_is_installed()) { data("ames", package = "modeldata") fit <- tabnet_fit(Sale_Price ~ ., data = ames, epochs = 1) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.