Comments (4)
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.
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.
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.
I see. Thanks for pointing it out! I will close it then.
from skorch.
Related Issues (20)
- AttributeError: 'NeuralNetClassifier' object has no attribute 'decision_function'
- IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item()` in C++ to convert a 0-dim tensor to a number HOT 8
- Enable using a generator as data loader
- Question: weird valid loss when re-scaling y
- Issues in braindecode recently introduced by skorch HOT 3
- ReadTheDocs: Wrong theme of docs
- How to tune number of epochs?
- Issues with deployment script
- sklearn.ensemble.BaggingRegressor() HOT 5
- import of skorch causes Jupyter kernel crash HOT 5
- NeuralNet validation not in evaluation mode. HOT 1
- Skorch API Documents Pages are blank HOT 2
- Remove deprecated pkg_resources import HOT 1
- Sampling strategy for FewShotClassifier HOT 1
- Classification with LLMs: Open tasks
- LLM ZeroShotClassifier returns bad results HOT 2
- Unable to use Pytorch Dataloader in Skorch NeuralNetClassifier
- Make dependency on torch explicit HOT 4
- SyntaxError: invalid escape sequence due to "\s" found in skorch.dataset docstring HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skorch.