Make partial_fit force a single iteration
See original GitHub issueCurrently partial_fit
and fit
+ warm_start
have the same behavior. I think it would be more useful if we followed SGD’s example and trained for exactly one epoch when partial_fit
is called, regardless of the value of epochs
/n_iter
passed to __init__
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Incremental Learning with sklearn: warm_start, partial_fit(), fit()
Answering my own question after some investigation: warm_start=True and calling .fit() sequentially should not be used for incremental ...
Read more >How to increase the number of iterations to optimize my cost ...
You can simply use the fit() method instead of the partial_fit() method and increase the max_iter by providing an integer value for the ......
Read more >sklearn.decomposition.IncrementalPCA
Incremental fit with X. All of X is processed as a single batch. Parameters: Xarray-like of shape (n_samples, n_features).
Read more >Customize what happens in Model.fit | TensorFlow Core
Let's start from a simple example: We create a new class that subclasses keras.Model . We just override the method train_step(self, data) ....
Read more >Gradient Descent Algorithm and Its Variants | by Imad Dabbura
Optimization algorithm that is not iterative and simply solves for one point. ... On each iteration, take the partial derivative of the cost...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yup. I’m working on a PR for that right now, and it’s pretty easy.
Yes. That’s correct. SciKeras should use
epochs=1
to fit inside of HyperbandSearchCV’s rule of thumb. I would probably specify this manually because I don’t like relying on defaults.Of course,
epochs=2
will not throw any errors, but it will require a small modification of the rule of thumb.Does that answer your question?
I think you’re largely correct. Here’s what happens right now:
max_iter
as onepartial_fit
call.*partial_fit
call corresponds to one pass through the dataset (e.g, MLPRegressor, SGDRegressor).partial_fit
andfit
perform the same action and train for all epochs, not a single pass through the dataset.*As detailed in Hyperband’s rule of thumb, the number of examples for each call should vary