我目前正在使用 cross_validation.cross_val_predict 来获取 LogisticRegression 分类器所做的预测。我的问题是:训练集的数据百分比是多少,测试集的数据百分比是多少?是 80%-20% 的拆分吗?
我检查了网站和 stackoverflow 上的其他问题,但没有找到我的问题的答案。
最佳答案
在documentation for this function ,它为 cv
arg 声明:
cv : cross-validation generator or int, optional, default: None A cross-validation generator to use. If int, determines the number of folds in StratifiedKFold if y is binary or multiclass and estimator is a classifier, or the number of folds in KFold otherwise. If None, it is equivalent to cv=3. This generator must include all elements in the test set exactly once. Otherwise, a ValueError is raised.
关于python - Scikit 学习交叉验证拆分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30423147/