Giter Club home page Giter Club logo

Comments (4)

BenjaminBossan avatar BenjaminBossan commented on May 31, 2024

In general, callbacks are used for training only. The validation step in grid search is inference (it calls predict or predict_proba), therefore, callbacks are not involved. If you could more explain in more details what you would like to achieve, I might be able to suggest a solution.

from skorch.

mingYi-ch avatar mingYi-ch commented on May 31, 2024

Hi Benjamin Bossan, Thanks for the feedback! In my case, I want to use EarlyStopping( where valid-set is required )when train the net while I am using randomizedSearchCV to tune params of the net. I am considering use the valid-set from cross-validation in randomizedSearchCV for EarlyStopping rather than doing a train_split again in skorch. Please let me know if it's not clear explained. Thanks!

from skorch.

BenjaminBossan avatar BenjaminBossan commented on May 31, 2024

Yes, I understand your intent. What you describe is not possible with callbacks. It is also not recommended. By using the validation data from grid search for early stopping, you actually leak information from the validation data into the training process. This could lead to overfitting. Therefore, it is best to use the train_split from skorch: it is based on the training data and therefore there is no leakage.

from skorch.

mingYi-ch avatar mingYi-ch commented on May 31, 2024

I see. Thanks for pointing it out! I will close it then.

from skorch.

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.