Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
105 views
in Technique[技术] by (71.8m points)

python - Is it required to do CV , if I use grid search cv?

I am using a grid search for hyper tuning my algorithm in ML. I have a doubt If I am using grid search cv is it mandatory to use cross-validation later? Because grid search also does cross-validation, so I think doing grid search cv is enough. Am I correct else please correct me

question from:https://stackoverflow.com/questions/66061499/is-it-required-to-do-cv-if-i-use-grid-search-cv

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Do a grid search and identify the hyper parameters. If you want to report the test score of the identified hyper parameters, you can either use the grid search reported metrics or do a train-test split and train with the identified hyper parameter and report the results of the test data.

You do CV to find hyper parameters or report test scores when the data is less. If you have enough data random shuffling and scoring the hyper parameters on test data is sufficient.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...