python - Scikit 学习交叉验证拆分

标签 python scikit-learn classification cross-validation

我目前正在使用 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/

相关文章:

用于大型 HTML/XML 的 Python 模板

Windows 上 Jupyter 笔记本中的 Python 路径

python - 具有一个(或多个)参数的 Python 多输出回归或分类器

python - Google App Engine,更改哪个python版本

python - 在 Python 中计算加权成对距离矩阵

python - 在 for 循环中保存 scikit-learn 模型

machine-learning - 根据先前数据的概率生成数据组合

scikit-learn - XGBoost 从 booster 对象中获取分类器对象?

python - 如何在人工神经网络中处理多个分类列?

python - 在python中计算范围内的用户输入数字