Why do I have to retrain the model every time?
See original GitHub issueDescribe the solution you’d like I want to be able to use ResidualsPlot and PredictionError classes without having to retrain the model every time. I want to be able to train the model on my own and pass in the y_actual, y_predicted, and X_test and make the plots. I have tried to use the draw() method but I get errors.
Is your feature request related to a problem? Please describe. Very frustrating to have to repeatedly train the model. I am having trouble even believing that this how it was designed, I hope I’m just missing something
Examples I want to be able to do this:
X_train, X_test, y_train, y_test = train_test_split(X, y)
lr = LinearRegression()
lr.fit(X_train, y_train)
y_pred = lr.predict(X_test)
resid = y_test - y_pred
resplot = ResidualsPlot()
resplot.draw(y_test, y_pred)
errplot = PredictionError()
errplot.draw(y_test, y_pred)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
To retrain, or not to retrain? Let's get analytical about ML ...
data, the answer to this question is surprisingly often based on a gut feeling. Some retrain the models overnight—because it is convenient.
Read more >Should a machine learning model be retrained each time new ...
Not always. Some models might need frequent retraining, but others can last long (i.e. a whole year) without updates. This depends on several...
Read more >When Should You Retrain Machine Learning Models? - phData
This post discusses some of the most common cues for retraining an ML model. We'll discuss why you need to retrain machine learning...
Read more >Retraining Model During Deployment: Continuous Training ...
This is because your model is sensitive to changes in the real world, and user behaviour keeps changing with time. Although all machine...
Read more >When Should a Machine Learning Model Be Retrained?
This was mostly because the model retraining tasks were laborious and cumbersome, but machine learning has come a long way in a short...
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 FreeTop 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
Top GitHub Comments
@pedropalb I think there is a blog post on this topic, but until I find the link - I wanted to mention that I’ve opened a PR that adds this functionality to the yellowbrick contrib module: #1189
Hi @pedropalb - thanks for using Yellowbrick! We currently don’t have plans to create such an interface. The issue is that Yellowbrick often takes advantage of the properties of models, particularly the learned attributes such as
coef_
in order to produce its visualizations. There are a few visualizers that can produce results without the estimator, but we’ve erred on the side of integrating into the ML workflow. (Note that we’re still looking to produce Keras estimators for Yellowbrick - #1106).However, it is hopefully pretty simple to produce an “estimator” that can do what you’d like. I thought we actually had this already in the contrib module, but for some reason I can’t find it - I’ll investigate and get back to you. But the basic sketch is as follows:
You may get some issues if Yellowbrick looks for an learned attribute you can’t find; but you can add them to the passthrough from your Keras model to make it work. Hope that helps!