tabnet
tabnet copied to clipboard
Supplying validation set manually
Hi,
I'm aware of valid_split
argument in tabnet_config()
but it uses a proportion of train set as validation set. I have standalone validation sets, how can I use them during training goes on a separate data ?
Thanks in advance.
Hello @sametsoekel There is not such a possibility for now in the package.
The easiest way to achieve it is to make a tabnet_fit()
loop without split on your training-set, resuming the previous epoch weights via from_model=
configuration option, and predict
on your validation-set at each epoch to compute your val-loss.
You will be able to see the end-to-end training loss with autoplot()
as it is accumulated in the model.
The more performant way is to modify the training loop in https://github.com/mlverse/tabnet/blob/89a396ad5cdf449fa819d4ef7a6f92e30ef81da7/R/model.R#L358 for your need with your datasets
hope it helps,