.FastTabular
TabularModel
function
defined in module
FastTabular
TabularModel(catbackbone, contbackbone, [finalclassifier]; kwargs...)
Create a tabular model which operates on a tuple of categorical values (label or one-hot encoded) and continuous values. The categorical backbones (
catbackbone
) and continuous backbone (
contbackbone
) operate on each element of the input tuple. The output from these backbones is then passed through a series of linear-batch norm-dropout layers before a
finalclassifier
block.
outsize
: The output size of the final classifier block. For single classification tasks, this would be the number of classes, and for regression tasks, this would be the number of target continuous variables.
layersizes
: A vector of sizes for each hidden layer in the sequence of linear layers.
dropout_rates
: Dropout probabilities for the linear-batch norm-dropout layers. This could either be a single number which would be used for for all the layers, or a collection of numbers which are cycled through for each layer.
batchnorm
: Set to
false
to skip each batch norm in the linear-batch norm-dropout sequence.
activation
: The activation function to use in the classifier layers.
linear_first
: Controls if the linear layer comes before or after batch norm and dropout.
TabularModel(n_cont, outsize, [layersizes; kwargs...])
Create a tabular model which operates on a tuple of categorical values (label or one-hot encoded) and continuous values. The default categorical backbone (
catbackbone
) is a
Flux.Parallel
set of
Flux.Embedding
layers corresponding to each categorical variable. The default continuous backbone (
contbackbone
) is a single
Flux.BatchNorm
. The output from these backbones is concatenated then passed through a series of linear-batch norm-dropout layers before a
finalclassifier
block.
n_cont
: The number of continuous columns.
outsize
: The output size of the model.
layersizes
: A vector of sizes for each hidden layer in the sequence of linear layers.
cardinalities
: A collection of sizes (number of classes) for each categorical column.
size_overrides
: An optional argument which corresponds to a collection containing embedding sizes to override the value returned by the "rule of thumb" for a particular index corresponding to
cardinalities
, or
nothing
.
There are
3
methods for FastTabular.TabularModel
:
The following pages link back here: