Giter Site home page Giter Site logo

Comments (9)

Optimox avatar Optimox commented on August 27, 2024 1

There is not enough information to consider you are in the over fitting realm : what is your train vs valid score ? the fact that features change from month to month simply shows that you have data shifts over time, not that it's not reasonable to rely on different features.

You can also set lambda_sparse to 0 to limit sparsity.

You can also limit number of epochs to avoid overfitting.

from tabnet.

micheusch avatar micheusch commented on August 27, 2024

thanks, I will investigate further and let you know!

from tabnet.

micheusch avatar micheusch commented on August 27, 2024

Fair enough, after plotting loss curves doesn’t look like over-fitting per se.
See below for n_d=n_a=8, n_steps=2, lambda_sparse=e-6
image001

Model is retrained monthly, but while there may be data shifts over time it shouldn’t be too dramatic as there’s only 2% of the time-period changing from one month to the next.

There could be variations from the random customer base used for the validation set, but again this is only 10% of the data. Not clear why this would be so much more erratic for TabNet than XGBoost.
Boxplot below shows feature importance variation on 12 consecutive models
image002

Looking at a few of the most unstable features, feature importance changes look a bit erratic.
image003

Compare this to the same box-plot for XGBoost, features are picked up much more consistently.
image004

Any thoughts on what could be causing these variations.
Many thanks!

from tabnet.

Optimox avatar Optimox commented on August 27, 2024

Are you computing feature importance on the training set or the monthly validation set?

Do you have better predictive scores with XGBoost or TabNet ?

Are you sure that all your tabnet models converge correctly before the end of training?

from tabnet.

micheusch avatar micheusch commented on August 27, 2024

Hi again @Optimox,

Feature importances computed on training set as per here.

I have slightly better performance with XGBoost on most months.

I had max_epochs=100, patience=60.
Now I've increased it to max_epochs=200 I have a mix of runs ending between 120 and 200 epochs, a few getting all the way to 200, although loss trajectory looks very flat.

Many thanks again!

from tabnet.

Optimox avatar Optimox commented on August 27, 2024

Are you using a learning rate scheduler ?

IMO, the best way to train neural networks is to tweak the learning rate and number of epochs so that you don't need to use early stopping anymore. With a good decay and number of epochs your model should reach its best validation score at the last epoch (or very close to best score). I do not know the size of your dataset here, but early stopping could be one explanation for the large differences you see on a monthly basis.

from tabnet.

micheusch avatar micheusch commented on August 27, 2024

from tabnet.

micheusch avatar micheusch commented on August 27, 2024

Hi again, so, also getting this behaviour using a StepLR scheduler, training to 200 epochs, not using early stopping

from tabnet.

Optimox avatar Optimox commented on August 27, 2024

Then I don't know, are you sure you are always feeding your features in the same order and correctly attributing the features and the importance ?

from tabnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.