0

Hi I am using tidy models and trying to generate a plot with RMSE as a function of log lambda with number of features along the top as posted below, if you are using glmnet you simple call plot on your cv.glmnet object and it will plot, However if using tidy models it is more complex,

Is it possible to extract a cv.glmnet object from your tune_results object and then call plot on that?

Plot

enter image description here

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
  • If you tuned lamba and then call `autoplot()` on your tune results, you will get almost exactly that kind of plot. See [here for an example](https://juliasilge.com/blog/tate-collection/). – Julia Silge Jan 26 '21 at 01:35
  • Hi Julia, Thank you for your response, I have got that plot already using `autoplot()` the problem is it doesn't show the number of features as the lambda changes which is what I am interested in. I can dig them out if i call `pull_workflow_fit()` on my final fitted model but I then loose the RMSE at each CV – Grant Neilson Jan 26 '21 at 09:52

0 Answers0