我最近开始使用 sklearn 并偶然发现了 Stratified
ShuffleSplit 函数。尽管我理解它的概念和它的用途,但我不太理解它运行所需的参数,例如n_split。根据sklearn的文档是这样写的
n_splits : int, default 10 Number of re-shuffling & splitting iterations.
我最好的猜测是,它告诉 StratifieShufflesplit 函数数据中的 starta 数量。
最佳答案
n_splits
是几乎每个交叉验证器的参数。一般来说,它决定您将创建多少个不同的验证(和训练)集。
如果您使用 StratifiedShuffleSplit,它不表示层数 - 这些是从数据集中分类目标的基本相对频率隐含的。
请参阅下面来自官方文档的引用(完整链接 here )
StratifiedShuffleSplit
StratifiedShuffleSplit is a variation of ShuffleSplit, which returns stratified splits, i.e which creates splits by preserving the same percentage for each target class as in the complete set.
关于python - sklearn.model_selection.StratifiedShuffleSplit 中 n_splits 的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50772949/