简体   繁体   English

K折交叉验证评估

[英]evaluation about K-fold cross validation

After K-fold cross validation, which evaluation metric was averaged?在 K 折交叉验证之后,平均哪个评估指标? Precision and recall, or F-measure?精度和召回率,还是 F-measure?

import pandas as pd
import numpy as np
from sklearn.model_selection import KFold
KFold(n_splits=2, random_state=None, shuffle=False)

The sklearn.model_selection.KFold function is a utility that provides the folds but does not actually perform k-fold validation. sklearn.model_selection.KFold函数是一个提供折叠但实际上执行 k 折叠验证的实用程序。 You have to implement this yourself!你必须自己实现这个!

See documentation description:请参阅文档说明:

Provides train/test indices to split data in train/test sets.提供训练/测试索引以拆分训练/测试集中的数据。 Split dataset into k consecutive folds (without shuffling by default).将数据集拆分为 k 个连续折叠(默认情况下不打乱)。

Each fold is then used once as a validation while the k - 1 remaining folds form the training set.然后将每个折叠用作一次验证,而剩余的k - 1折叠形成训练集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM