No tests found for
TabularModel. To contribute a test please refer to this guide and this discussion.
Basic model for tabular data.
emb_szs match each categorical variable size with an embedding size,
n_cont is the number of continuous variables. The model consists of
Embedding layers for the categorical variables, followed by a
emb_drop, and a
BatchNorm for the continuous variables. The results are concatenated and followed by blocks of
ReLU (the first block skips
Dropout, the last block skips the
The sizes of the blocks are given in
layers and the probabilities of the
ps. The last size is
out_sz, and we add a last activation that is a sigmoid rescaled to cover
y_range (if it's not
None). Lastly, if
use_bn is set to False, all
BatchNorm layers are skipped except the one applied to the continuous variables.
Generally it's easiest to just create a learner with
tabular_learner, which will automatically create a
TabularModel for you.