无法导入属于Sklearn的函数?

时间:2017-07-09 17:46:11

标签: python module scikit-learn package cross-validation

我正在尝试通过RepeatedStratifiedKFold使用from sklearn.model_selection import RepeatedStratifiedKFold。通过查看网站here,我可以看到此功能在Sklearn中实现。

我最近完成了pip install -U scikit-learn,并安装了版本0.18.2。但是,当我查看C:\Anaconda3\Lib\site-packages\model_selection\__init__.py时,没有提到RepeatedStratifiedKFold(见下文)。

是否有人知道为什么此功能作为Sklearn代码的一部分列出,但在更新Sklearn包时不会出现?

此外,我如何访问此功能?

from ._split import BaseCrossValidator
from ._split import KFold
from ._split import GroupKFold
from ._split import StratifiedKFold
from ._split import TimeSeriesSplit
from ._split import LeaveOneGroupOut
from ._split import LeaveOneOut
from ._split import LeavePGroupsOut
from ._split import LeavePOut
from ._split import ShuffleSplit
from ._split import GroupShuffleSplit
from ._split import StratifiedShuffleSplit
from ._split import PredefinedSplit
from ._split import train_test_split
from ._split import check_cv

from ._validation import cross_val_score
from ._validation import cross_val_predict
from ._validation import learning_curve
from ._validation import permutation_test_score
from ._validation import validation_curve

from ._search import GridSearchCV
from ._search import RandomizedSearchCV
from ._search import ParameterGrid
from ._search import ParameterSampler
from ._search import fit_grid_point

__all__ = ('BaseCrossValidator',
       'GridSearchCV',
       'TimeSeriesSplit',
       'KFold',
       'GroupKFold',
       'GroupShuffleSplit',
       'LeaveOneGroupOut',
       'LeaveOneOut',
       'LeavePGroupsOut',
       'LeavePOut',
       'ParameterGrid',
       'ParameterSampler',
       'PredefinedSplit',
       'RandomizedSearchCV',
       'ShuffleSplit',
       'StratifiedKFold',
       'StratifiedShuffleSplit',
       'check_cv',
       'cross_val_predict',
       'cross_val_score',
       'fit_grid_point',
       'learning_curve',
       'permutation_test_score',
       'train_test_split',
       'validation_curve')

0 个答案:

没有答案