I am working on a regression model, how can I use cross validation to select the degree of polynomial with lowest error, and also the value of lamda with lowest error without having to do them one after the other.
Hi @Stanley_E,
I would recommend to take a look at nested cross validation which is explained well on this page here: https://machinelearningmastery.com/nested-cross-validation-for-machine-learning-with-python/
Basically you can apply this strategy to solve your specific problem to figure out the best polynomial degree (for which you want to find the best model parameters).
Best regards
Christian
1 Like
That’s the traditional method. You can also use a grid or binary search method, if you want to survey a lot of values.
1 Like