标签: python scikit-learn grid-search hyperparameters
GridsearchCV()有一个参数cv,默认值为3表示它是3倍。有没有办法使用Gridsearch()与holdout验证方案。例如80-20%分裂???
答案 0 :(得分:0)
您可以使用sklearn.model_selection.ShuffleSplit或sklearn.model_selection.StratifiedShuffleSplit代替n_splits=1来代替cv参数
sklearn.model_selection.ShuffleSplit
sklearn.model_selection.StratifiedShuffleSplit
n_splits=1
阅读文档以获取更多详细信息 http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.StratifiedShuffleSplit.html#sklearn.model_selection.StratifiedShuffleSplit