Module Expr Str ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias Import alias ImportFrom alias alias Import alias identifier ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str ClassDef bases Call NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Yield TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Return Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Return Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body For NameStore Call NameLoad Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Yield Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Return Call NameLoad Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad decorator_list decorator_list ClassDef bases Call NameLoad NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareLtE NameLoad Num body Raise Call NameLoad Call AttributeLoad Str attr NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad body Expr Yield TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMult BinOpFloorDiv NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr AugAssignAdd SubscriptStore NameLoad Slice BinOpMod NameLoad NameLoad Num Assign NameStore Num For NameStore NameLoad body Assign TupleStore NameStore NameStore TupleLoad NameLoad BinOpAdd NameLoad NameLoad Expr Yield SubscriptLoad NameLoad Slice NameLoad NameLoad Assign NameStore NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Slice Num Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Yield SubscriptLoad Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad Index Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr CompareGt AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad body For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index CompareEq NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index CompareLt NameLoad Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index CompareEq NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Yield CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Yield CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword AttributeLoad NameLoad attr For NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index CompareEq NameLoad NameLoad NameLoad Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Return Call NameLoad Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword NameLoad decorator_list decorator_list ClassDef bases Call NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Expr Yield TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad NameLoad Expr Yield TupleLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad For TupleStore NameStore NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Yield TupleLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad NameLoad If CompareLt Call AttributeLoad NameLoad attr NameLoad Num body Raise Call NameLoad Str If CompareLt NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareLt NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad attr NameLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad SubscriptLoad Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad Index Num Index NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice SubscriptLoad NameLoad Index NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad If CompareLt BinOpAdd Call NameLoad NameLoad Call NameLoad NameLoad BinOpAdd NameLoad NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr CompareEq Call NameLoad BinOpAdd NameLoad NameLoad keyword Call NameLoad NameLoad Num Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice UnaryOpUSub NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Yield TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str If CompareIsNot NameLoad NameLoad body If CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str body If CompareGtE NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad orelse If CompareNotEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str body Raise Call NameLoad BinOpMod Str NameLoad If CompareIsNot NameLoad NameLoad body If CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str body If CompareGtE NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad orelse If BoolOpAnd CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str CompareGt BinOpAdd NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str BinOpAdd NameLoad NameLoad orelse If CompareNotEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str body Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str CompareGtE NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str CompareGtE NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str body Assign NameStore Call NameLoad BinOpMult NameLoad NameLoad orelse If CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str body Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad orelse If CompareEq AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str body Assign NameStore Call NameLoad BinOpMult NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad If CompareGt BinOpAdd NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad BinOpAdd NameLoad NameLoad NameLoad Return TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index CompareNotEq AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Yield TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Expr Yield TupleLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Num If Call NameLoad NameLoad AttributeLoad NameLoad attr body If BoolOpAnd NameLoad CompareIsNot NameLoad NameLoad CompareIn Call NameLoad NameLoad TupleLoad Str Str body Return Call NameLoad NameLoad orelse Return Call NameLoad NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad Str Call NameLoad NameLoad NameLoad body If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Return Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Assign NameStore Num Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Num keyword NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr GeneratorExp TupleLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad Str body If Call NameLoad NameLoad Str NameLoad body Raise Call NameLoad Str Assign NameStore ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad orelse If Call NameLoad NameLoad Str NameLoad body If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad orelse Assign NameStore NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad AttributeLoad NameLoad attr body Assign NameStore ListLoad orelse Assign NameStore Call NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BoolOpAnd CompareNotEq AttributeLoad NameLoad attr Str CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad TryFinally body With Call AttributeLoad NameLoad attr keyword NameLoad NameStore body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad body Continue finalbody Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Return BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad keyword Call NameLoad NameLoad decorator_list
N/A N/A 
The :mod:`sklearn.model_selection._split` module includes classes and
functions to split the data based on a preset strategy.
 __future__ print_function __future__ division N/A warnings N/A inspect itertools chain combinations collections Iterable math ceil floor N/A numbers abc ABCMeta abstractmethod N/A numpy np scipy.misc comb utils indexable check_random_state safe_indexing utils.validation _num_samples column_or_1d utils.multiclass type_of_target externals.six with_metaclass externals.six.moves zip utils.fixes bincount utils.fixes signature base _pprint gaussian_process.kernels Kernel GPKernel N/A __all__ N/A BaseCrossValidator KFold LabelKFold LeaveOneLabelOut LeaveOneOut LeavePLabelOut LeavePOut ShuffleSplit LabelShuffleSplit StratifiedKFold StratifiedShuffleSplit PredefinedSplit train_test_split check_cv BaseCrossValidator N/A N/A with_metaclass ABCMeta N/A N/A Base class for all cross-validators

    Implementations must define `_iter_test_masks` or `_iter_test_indices`.
     __init__ N/A N/A self N/A N/A N/A N/A split N/A N/A self X y labels N/A None None N/A N/A Generate indices to split data into training and test set.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data, where n_samples is the number of samples
            and n_features is the number of features.

        y : array-like, of length n_samples
            The target variable for supervised learning problems.

        labels : array-like, with shape (n_samples,), optional
            Group labels for the samples used while splitting the dataset into
            train/test set.

        Returns
        -------
        train : ndarray
            The training set indices for that split.

        test : ndarray
            The testing set indices for that split.
         N/A N/A X y labels N/A indexable X y labels N/A indices N/A N/A np arange N/A _num_samples X N/A test_index N/A N/A self _iter_test_masks X y labels N/A N/A train_index N/A indices N/A N/A N/A np logical_not test_index N/A test_index N/A indices N/A test_index N/A N/A N/A train_index test_index N/A _iter_test_masks N/A N/A self X y labels N/A None None None N/A N/A Generates boolean masks corresponding to test sets.

        By default, delegates to _iter_test_indices(X, y, labels)
         N/A test_index N/A N/A self _iter_test_indices X y labels N/A N/A test_mask N/A N/A np zeros N/A _num_samples X dtype N/A np bool N/A N/A test_mask N/A test_index True N/A N/A test_mask N/A _iter_test_indices N/A N/A self X y labels N/A None None None N/A N/A Generates integer indices corresponding to test sets. N/A NotImplementedError N/A get_n_splits N/A N/A self X y labels N/A None None None N/A N/A Returns the number of splitting iterations in the cross-validator N/A abstractmethod __repr__ N/A N/A self N/A N/A N/A N/A _build_repr self N/A N/A LeaveOneOut N/A BaseCrossValidator N/A N/A Leave-One-Out cross-validator

    Provides train/test indices to split data in train/test sets. Each
    sample is used once as a test set (singleton) while the remaining
    samples form the training set.

    Note: ``LeaveOneOut()`` is equivalent to ``KFold(n_folds=n)`` and
    ``LeavePOut(p=1)`` where ``n`` is the number of samples.

    Due to the high number of test sets (which is the same as the
    number of samples) this cross-validation method can be very costly.
    For large datasets one should favor :class:`KFold`, :class:`ShuffleSplit`
    or :class:`StratifiedKFold`.

    Read more in the :ref:`User Guide <cross_validation>`.

    Examples
    --------
    >>> from sklearn.model_selection import LeaveOneOut
    >>> X = np.array([[1, 2], [3, 4]])
    >>> y = np.array([1, 2])
    >>> loo = LeaveOneOut()
    >>> loo.get_n_splits(X)
    2
    >>> print(loo)
    LeaveOneOut()
    >>> for train_index, test_index in loo.split(X):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    ...    print(X_train, X_test, y_train, y_test)
    TRAIN: [1] TEST: [0]
    [[3 4]] [[1 2]] [2] [1]
    TRAIN: [0] TEST: [1]
    [[1 2]] [[3 4]] [1] [2]

    See also
    --------
    LeaveOneLabelOut
        For splitting the data according to explicit, domain-specific
        stratification of the dataset.

    LabelKFold: K-fold iterator variant with non-overlapping labels.
     _iter_test_indices N/A N/A self X y labels N/A None None N/A N/A N/A range N/A _num_samples X N/A get_n_splits N/A N/A self X y labels N/A None None N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data, where n_samples is the number of samples
            and n_features is the number of features.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.

        Returns
        -------
        n_splits : int
            Returns the number of splitting iterations in the cross-validator.
         N/A N/A X None N/A N/A N/A ValueError The X parameter should not be None N/A N/A _num_samples X N/A N/A LeavePOut N/A BaseCrossValidator N/A N/A Leave-P-Out cross-validator

    Provides train/test indices to split data in train/test sets. This results
    in testing on all distinct samples of size p, while the remaining n - p
    samples form the training set in each iteration.

    Note: ``LeavePOut(p)`` is NOT equivalent to
    ``KFold(n_folds=n_samples // p)`` which creates non-overlapping test sets.

    Due to the high number of iterations which grows combinatorically with the
    number of samples this cross-validation method can be very costly. For
    large datasets one should favor :class:`KFold`, :class:`StratifiedKFold`
    or :class:`ShuffleSplit`.

    Read more in the :ref:`User Guide <cross_validation>`.

    Parameters
    ----------
    p : int
        Size of the test sets.

    Examples
    --------
    >>> from sklearn.model_selection import LeavePOut
    >>> X = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])
    >>> y = np.array([1, 2, 3, 4])
    >>> lpo = LeavePOut(2)
    >>> lpo.get_n_splits(X)
    6
    >>> print(lpo)
    LeavePOut(p=2)
    >>> for train_index, test_index in lpo.split(X):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    TRAIN: [2 3] TEST: [0 1]
    TRAIN: [1 3] TEST: [0 2]
    TRAIN: [1 2] TEST: [0 3]
    TRAIN: [0 3] TEST: [1 2]
    TRAIN: [0 2] TEST: [1 3]
    TRAIN: [0 1] TEST: [2 3]
     __init__ N/A N/A self p N/A N/A N/A N/A self p p N/A _iter_test_indices N/A N/A self X y labels N/A None None N/A N/A combination N/A combinations N/A range N/A _num_samples X N/A self p N/A N/A N/A N/A N/A np array combination N/A get_n_splits N/A N/A self X y labels N/A None None N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data, where n_samples is the number of samples
            and n_features is the number of features.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.
         N/A N/A X None N/A N/A N/A ValueError The X parameter should not be None N/A N/A int N/A comb N/A _num_samples X N/A self p exact True N/A N/A _BaseKFold N/A N/A with_metaclass ABCMeta BaseCrossValidator N/A N/A Base class for KFold and StratifiedKFold __init__ N/A N/A self n_folds shuffle random_state N/A N/A N/A N/A N/A isinstance n_folds N/A numbers Integral N/A N/A N/A ValueError N/A The number of folds must be of Integral type. %s of type %s was passed. N/A n_folds N/A type n_folds N/A n_folds N/A int n_folds N/A N/A n_folds 1 N/A N/A N/A ValueError N/A N/A k-fold cross-validation requires at least one train/test split by setting n_folds=2 or more, got n_folds={0}. format n_folds N/A N/A N/A isinstance shuffle bool N/A N/A N/A TypeError N/A N/A shuffle must be True or False; got {0} format shuffle N/A N/A self n_folds n_folds N/A N/A self shuffle shuffle N/A N/A self random_state random_state N/A abstractmethod split N/A N/A self X y labels N/A None None N/A N/A Generate indices to split data into training and test set.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data, where n_samples is the number of samples
            and n_features is the number of features.

        y : array-like, shape (n_samples,)
            The target variable for supervised learning problems.

        labels : array-like, with shape (n_samples,), optional
            Group labels for the samples used while splitting the dataset into
            train/test set.

        Returns
        -------
        train : ndarray
            The training set indices for that split.

        test : ndarray
            The testing set indices for that split.
         N/A N/A X y labels N/A indexable X y labels N/A n_samples N/A _num_samples X N/A N/A N/A self n_folds n_samples N/A N/A N/A ValueError N/A N/A Cannot have number of folds n_folds={0} greater than the number of samples: {1}. format N/A self n_folds n_samples N/A N/A train test N/A N/A N/A super _BaseKFold self split X y labels N/A N/A N/A N/A train test N/A get_n_splits N/A N/A self X y labels N/A None None None N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.

        Returns
        -------
        n_splits : int
            Returns the number of splitting iterations in the cross-validator.
         N/A N/A self n_folds N/A N/A KFold N/A _BaseKFold N/A N/A K-Folds cross-validator

    Provides train/test indices to split data in train/test sets. Split
    dataset into k consecutive folds (without shuffling by default).

    Each fold is then used once as a validation while the k - 1 remaining
    folds form the training set.

    Read more in the :ref:`User Guide <cross_validation>`.

    Parameters
    ----------
    n_folds : int, default=3
        Number of folds. Must be at least 2.

    shuffle : boolean, optional
        Whether to shuffle the data before splitting into batches.

    random_state : None, int or RandomState
        When shuffle=True, pseudo-random number generator state used for
        shuffling. If None, use default numpy RNG for shuffling.

    Examples
    --------
    >>> from sklearn.model_selection import KFold
    >>> X = np.array([[1, 2], [3, 4], [1, 2], [3, 4]])
    >>> y = np.array([1, 2, 3, 4])
    >>> kf = KFold(n_folds=2)
    >>> kf.get_n_splits(X)
    2
    >>> print(kf)  # doctest: +NORMALIZE_WHITESPACE
    KFold(n_folds=2, random_state=None, shuffle=False)
    >>> for train_index, test_index in kf.split(X):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    TRAIN: [2 3] TEST: [0 1]
    TRAIN: [0 1] TEST: [2 3]

    Notes
    -----
    The first ``n_samples % n_folds`` folds have size
    ``n_samples // n_folds + 1``, other folds have size
    ``n_samples // n_folds``, where ``n_samples`` is the number of samples.

    See also
    --------
    StratifiedKFold
        Takes label information into account to avoid building folds with
        imbalanced class distributions (for binary or multiclass
        classification tasks).

    LabelKFold: K-fold iterator variant with non-overlapping labels.
     __init__ N/A N/A self n_folds shuffle random_state N/A 3 False None N/A N/A N/A N/A N/A super KFold self __init__ n_folds shuffle random_state N/A _iter_test_indices N/A N/A self X y labels N/A None None N/A N/A n_samples N/A _num_samples X N/A indices N/A N/A np arange n_samples N/A N/A self shuffle N/A N/A N/A N/A N/A check_random_state N/A self random_state shuffle indices N/A n_folds N/A self n_folds N/A fold_sizes N/A N/A n_samples n_folds N/A N/A np ones n_folds dtype N/A np int N/A N/A fold_sizes N/A N/A n_samples n_folds 1 N/A current 0 N/A fold_size fold_sizes N/A N/A N/A start stop N/A current N/A current fold_size N/A N/A N/A indices N/A start stop N/A current stop N/A N/A LabelKFold N/A _BaseKFold N/A N/A K-fold iterator variant with non-overlapping labels.

    The same label will not appear in two different folds (the number of
    distinct labels has to be at least equal to the number of folds).

    The folds are approximately balanced in the sense that the number of
    distinct labels is approximately the same in each fold.

    Parameters
    ----------
    n_folds : int, default=3
        Number of folds. Must be at least 2.

    Examples
    --------
    >>> from sklearn.model_selection import LabelKFold
    >>> X = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])
    >>> y = np.array([1, 2, 3, 4])
    >>> labels = np.array([0, 0, 2, 2])
    >>> label_kfold = LabelKFold(n_folds=2)
    >>> label_kfold.get_n_splits(X, y, labels)
    2
    >>> print(label_kfold)
    LabelKFold(n_folds=2)
    >>> for train_index, test_index in label_kfold.split(X, y, labels):
    ...     print("TRAIN:", train_index, "TEST:", test_index)
    ...     X_train, X_test = X[train_index], X[test_index]
    ...     y_train, y_test = y[train_index], y[test_index]
    ...     print(X_train, X_test, y_train, y_test)
    ...
    TRAIN: [0 1] TEST: [2 3]
    [[1 2]
     [3 4]] [[5 6]
     [7 8]] [1 2] [3 4]
    TRAIN: [2 3] TEST: [0 1]
    [[5 6]
     [7 8]] [[1 2]
     [3 4]] [3 4] [1 2]

    See also
    --------
    LeaveOneLabelOut
        For splitting the data according to explicit domain-specific
        stratification of the dataset.
     __init__ N/A N/A self n_folds N/A 3 N/A N/A N/A N/A N/A super LabelKFold self __init__ n_folds shuffle False random_state None N/A _iter_test_indices N/A N/A self X y labels N/A N/A N/A N/A labels None N/A N/A N/A ValueError The labels parameter should not be None N/A N/A unique_labels labels N/A N/A np unique labels return_inverse True N/A n_labels N/A len unique_labels N/A N/A N/A self n_folds n_labels N/A N/A N/A ValueError N/A Cannot have number of folds n_folds=%d greater than the number of labels: %d. N/A N/A self n_folds n_labels N/A n_samples_per_label N/A N/A np bincount labels N/A indices N/A N/A N/A np argsort n_samples_per_label N/A -1 N/A n_samples_per_label N/A n_samples_per_label N/A indices N/A n_samples_per_fold N/A N/A np zeros N/A self n_folds N/A label_to_fold N/A N/A np zeros N/A len unique_labels N/A N/A label_index weight N/A enumerate n_samples_per_label N/A N/A lightest_fold N/A N/A np argmin n_samples_per_fold N/A N/A n_samples_per_fold N/A lightest_fold weight N/A N/A label_to_fold N/A N/A indices N/A label_index lightest_fold N/A indices N/A label_to_fold N/A labels N/A f N/A range N/A self n_folds N/A N/A N/A N/A N/A N/A np where N/A indices f N/A 0 N/A N/A StratifiedKFold N/A _BaseKFold N/A N/A Stratified K-Folds cross-validator

    Provides train/test indices to split data in train/test sets.

    This cross-validation object is a variation of KFold that returns
    stratified folds. The folds are made by preserving the percentage of
    samples for each class.

    Read more in the :ref:`User Guide <cross_validation>`.

    Parameters
    ----------
    n_folds : int, default=3
        Number of folds. Must be at least 2.

    shuffle : boolean, optional
        Whether to shuffle each stratification of the data before splitting
        into batches.

    random_state : None, int or RandomState
        When shuffle=True, pseudo-random number generator state used for
        shuffling. If None, use default numpy RNG for shuffling.

    Examples
    --------
    >>> from sklearn.model_selection import StratifiedKFold
    >>> X = np.array([[1, 2], [3, 4], [1, 2], [3, 4]])
    >>> y = np.array([0, 0, 1, 1])
    >>> skf = StratifiedKFold(n_folds=2)
    >>> skf.get_n_splits(X, y)
    2
    >>> print(skf)  # doctest: +NORMALIZE_WHITESPACE
    StratifiedKFold(n_folds=2, random_state=None, shuffle=False)
    >>> for train_index, test_index in skf.split(X, y):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    TRAIN: [1 3] TEST: [0 2]
    TRAIN: [0 2] TEST: [1 3]

    Notes
    -----
    All the folds have size ``trunc(n_samples / n_folds)``, the last one has
    the complementary.

     __init__ N/A N/A self n_folds shuffle random_state N/A 3 False None N/A N/A N/A N/A N/A super StratifiedKFold self __init__ n_folds shuffle random_state N/A _make_test_folds N/A N/A self X y labels N/A None None N/A N/A N/A self shuffle N/A N/A rng N/A check_random_state N/A self random_state N/A N/A rng N/A self random_state N/A y N/A N/A np asarray y N/A n_samples N/A N/A y shape N/A 0 N/A N/A unique_y y_inversed N/A N/A np unique y return_inverse True N/A y_counts N/A bincount y_inversed N/A min_labels N/A N/A np min y_counts N/A N/A N/A np all N/A N/A self n_folds y_counts N/A N/A N/A ValueError N/A All the n_labels for individual classes are less than %d folds. N/A self n_folds N/A N/A N/A self n_folds min_labels N/A N/A N/A N/A warnings warn N/A The least populated class in y has only %d members, which is too few. The minimum number of labels for any class cannot be less than n_folds=%d. N/A min_labels N/A self n_folds Warning N/A per_cls_cvs N/A N/A N/A N/A KFold N/A self n_folds shuffle N/A self shuffle random_state rng split N/A N/A np zeros N/A max count N/A self n_folds N/A count y_counts N/A test_folds N/A N/A np zeros n_samples dtype N/A np int N/A N/A test_fold_indices per_cls_splits N/A enumerate N/A zip per_cls_cvs N/A N/A N/A cls N/A _ test_split N/A zip unique_y per_cls_splits N/A N/A cls_test_folds N/A test_folds N/A N/A y cls N/A test_split N/A test_split N/A N/A test_split N/A len cls_test_folds N/A N/A cls_test_folds N/A test_split test_fold_indices N/A N/A test_folds N/A N/A y cls cls_test_folds N/A test_folds N/A _iter_test_masks N/A N/A self X y labels N/A None None N/A N/A test_folds N/A N/A self _make_test_folds X y N/A i N/A range N/A self n_folds N/A N/A N/A N/A test_folds i N/A split N/A N/A self X y labels N/A None N/A N/A Generate indices to split data into training and test set.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data, where n_samples is the number of samples
            and n_features is the number of features.

        y : array-like, shape (n_samples,)
            The target variable for supervised learning problems.

        labels : array-like, with shape (n_samples,), optional
            Group labels for the samples used while splitting the dataset into
            train/test set.

        Returns
        -------
        train : ndarray
            The training set indices for that split.

        test : ndarray
            The testing set indices for that split.
         N/A N/A N/A N/A super StratifiedKFold self split X y labels N/A N/A LeaveOneLabelOut N/A BaseCrossValidator N/A N/A Leave One Label Out cross-validator

    Provides train/test indices to split data according to a third-party
    provided label. This label information can be used to encode arbitrary
    domain specific stratifications of the samples as integers.

    For instance the labels could be the year of collection of the samples
    and thus allow for cross-validation against time-based splits.

    Read more in the :ref:`User Guide <cross_validation>`.

    Examples
    --------
    >>> from sklearn.model_selection import LeaveOneLabelOut
    >>> X = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])
    >>> y = np.array([1, 2, 1, 2])
    >>> labels = np.array([1, 1, 2, 2])
    >>> lol = LeaveOneLabelOut()
    >>> lol.get_n_splits(X, y, labels)
    2
    >>> print(lol)
    LeaveOneLabelOut()
    >>> for train_index, test_index in lol.split(X, y, labels):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    ...    print(X_train, X_test, y_train, y_test)
    TRAIN: [2 3] TEST: [0 1]
    [[5 6]
     [7 8]] [[1 2]
     [3 4]] [1 2] [1 2]
    TRAIN: [0 1] TEST: [2 3]
    [[1 2]
     [3 4]] [[5 6]
     [7 8]] [1 2] [1 2]

     _iter_test_masks N/A N/A self X y labels N/A N/A N/A N/A labels None N/A N/A N/A ValueError The labels parameter should not be None N/A labels N/A N/A np array labels copy True N/A unique_labels N/A N/A np unique labels N/A i unique_labels N/A N/A N/A N/A labels i N/A get_n_splits N/A N/A self X y labels N/A N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : array-like, with shape (n_samples,), optional
            Group labels for the samples used while splitting the dataset into
            train/test set.

        Returns
        -------
        n_splits : int
            Returns the number of splitting iterations in the cross-validator.
         N/A N/A labels None N/A N/A N/A ValueError The labels parameter should not be None N/A N/A len N/A N/A np unique labels N/A N/A LeavePLabelOut N/A BaseCrossValidator N/A N/A Leave P Labels Out cross-validator

    Provides train/test indices to split data according to a third-party
    provided label. This label information can be used to encode arbitrary
    domain specific stratifications of the samples as integers.

    For instance the labels could be the year of collection of the samples
    and thus allow for cross-validation against time-based splits.

    The difference between LeavePLabelOut and LeaveOneLabelOut is that
    the former builds the test sets with all the samples assigned to
    ``p`` different values of the labels while the latter uses samples
    all assigned the same labels.

    Read more in the :ref:`User Guide <cross_validation>`.

    Parameters
    ----------
    n_labels : int
        Number of labels (``p``) to leave out in the test split.

    Examples
    --------
    >>> from sklearn.model_selection import LeavePLabelOut
    >>> X = np.array([[1, 2], [3, 4], [5, 6]])
    >>> y = np.array([1, 2, 1])
    >>> labels = np.array([1, 2, 3])
    >>> lpl = LeavePLabelOut(n_labels=2)
    >>> lpl.get_n_splits(X, y, labels)
    3
    >>> print(lpl)
    LeavePLabelOut(n_labels=2)
    >>> for train_index, test_index in lpl.split(X, y, labels):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    ...    print(X_train, X_test, y_train, y_test)
    TRAIN: [2] TEST: [0 1]
    [[5 6]] [[1 2]
     [3 4]] [1] [1 2]
    TRAIN: [1] TEST: [0 2]
    [[3 4]] [[1 2]
     [5 6]] [2] [1 1]
    TRAIN: [0] TEST: [1 2]
    [[1 2]] [[3 4]
     [5 6]] [1] [2 1]

    See also
    --------
    LabelKFold: K-fold iterator variant with non-overlapping labels.
     __init__ N/A N/A self n_labels N/A N/A N/A N/A self n_labels n_labels N/A _iter_test_masks N/A N/A self X y labels N/A N/A N/A N/A labels None N/A N/A N/A ValueError The labels parameter should not be None N/A labels N/A N/A np array labels copy True N/A unique_labels N/A N/A np unique labels N/A combi N/A combinations N/A range N/A len unique_labels N/A self n_labels N/A indices combi N/A N/A test_index N/A N/A np zeros N/A _num_samples X dtype N/A np bool N/A l N/A unique_labels N/A N/A N/A np array indices N/A N/A N/A test_index N/A N/A labels l True N/A N/A test_index N/A get_n_splits N/A N/A self X y labels N/A N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : array-like, with shape (n_samples,), optional
            Group labels for the samples used while splitting the dataset into
            train/test set.

        Returns
        -------
        n_splits : int
            Returns the number of splitting iterations in the cross-validator.
         N/A N/A labels None N/A N/A N/A ValueError The labels parameter should not be None N/A N/A int N/A comb N/A len N/A N/A np unique labels N/A self n_labels exact True N/A N/A BaseShuffleSplit N/A N/A with_metaclass ABCMeta N/A N/A Base class for ShuffleSplit and StratifiedShuffleSplit __init__ N/A N/A self n_iter test_size train_size random_state N/A 10 0.1 None None N/A N/A N/A _validate_shuffle_split_init test_size train_size N/A N/A self n_iter n_iter N/A N/A self test_size test_size N/A N/A self train_size train_size N/A N/A self random_state random_state N/A split N/A N/A self X y labels N/A None None N/A N/A Generate indices to split data into training and test set.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data, where n_samples is the number of samples
            and n_features is the number of features.

        y : array-like, shape (n_samples,)
            The target variable for supervised learning problems.

        labels : array-like, with shape (n_samples,), optional
            Group labels for the samples used while splitting the dataset into
            train/test set.

        Returns
        -------
        train : ndarray
            The training set indices for that split.

        test : ndarray
            The testing set indices for that split.
         N/A N/A X y labels N/A indexable X y labels N/A N/A train test N/A N/A self _iter_indices X y labels N/A N/A N/A N/A train test N/A _iter_indices N/A N/A self X y labels N/A None None N/A N/A Generate (train, test) indices N/A abstractmethod get_n_splits N/A N/A self X y labels N/A None None None N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.

        Returns
        -------
        n_splits : int
            Returns the number of splitting iterations in the cross-validator.
         N/A N/A self n_iter N/A __repr__ N/A N/A self N/A N/A N/A N/A _build_repr self N/A N/A ShuffleSplit N/A BaseShuffleSplit N/A N/A Random permutation cross-validator

    Yields indices to split data into training and test sets.

    Note: contrary to other cross-validation strategies, random splits
    do not guarantee that all folds will be different, although this is
    still very likely for sizeable datasets.

    Read more in the :ref:`User Guide <cross_validation>`.

    Parameters
    ----------
    n_iter : int (default 10)
        Number of re-shuffling & splitting iterations.

    test_size : float, int, or None, default 0.1
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the dataset to include in the test split. If
        int, represents the absolute number of test samples. If None,
        the value is automatically set to the complement of the train size.

    train_size : float, int, or None (default is None)
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the dataset to include in the train split. If
        int, represents the absolute number of train samples. If None,
        the value is automatically set to the complement of the test size.

    random_state : int or RandomState
        Pseudo-random number generator state used for random sampling.

    Examples
    --------
    >>> from sklearn.model_selection import ShuffleSplit
    >>> X = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])
    >>> y = np.array([1, 2, 1, 2])
    >>> rs = ShuffleSplit(n_iter=3, test_size=.25, random_state=0)
    >>> rs.get_n_splits(X)
    3
    >>> print(rs)
    ShuffleSplit(n_iter=3, random_state=0, test_size=0.25, train_size=None)
    >>> for train_index, test_index in rs.split(X):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...  # doctest: +ELLIPSIS
    TRAIN: [3 1 0] TEST: [2]
    TRAIN: [2 1 3] TEST: [0]
    TRAIN: [0 2 1] TEST: [3]
    >>> rs = ShuffleSplit(n_iter=3, train_size=0.5, test_size=.25,
    ...                   random_state=0)
    >>> for train_index, test_index in rs.split(X):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...  # doctest: +ELLIPSIS
    TRAIN: [3 1] TEST: [2]
    TRAIN: [2 1] TEST: [0]
    TRAIN: [0 2] TEST: [3]
     _iter_indices N/A N/A self X y labels N/A None None N/A N/A n_samples N/A _num_samples X N/A N/A n_train n_test N/A _validate_shuffle_split n_samples N/A self test_size N/A self train_size N/A rng N/A check_random_state N/A self random_state N/A i N/A range N/A self n_iter N/A N/A permutation N/A N/A rng permutation n_samples N/A ind_test N/A permutation N/A n_test N/A ind_train N/A permutation N/A n_test N/A n_test n_train N/A N/A N/A ind_train ind_test N/A N/A LabelShuffleSplit N/A ShuffleSplit N/A N/A Shuffle-Labels-Out cross-validation iterator

    Provides randomized train/test indices to split data according to a
    third-party provided label. This label information can be used to encode
    arbitrary domain specific stratifications of the samples as integers.

    For instance the labels could be the year of collection of the samples
    and thus allow for cross-validation against time-based splits.

    The difference between LeavePLabelOut and LabelShuffleSplit is that
    the former generates splits using all subsets of size ``p`` unique labels,
    whereas LabelShuffleSplit generates a user-determined number of random
    test splits, each with a user-determined fraction of unique labels.

    For example, a less computationally intensive alternative to
    ``LeavePLabelOut(p=10)`` would be
    ``LabelShuffleSplit(test_size=10, n_iter=100)``.

    Note: The parameters ``test_size`` and ``train_size`` refer to labels, and
    not to samples, as in ShuffleSplit.


    Parameters
    ----------
    n_iter : int (default 5)
        Number of re-shuffling & splitting iterations.

    test_size : float (default 0.2), int, or None
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the labels to include in the test split. If
        int, represents the absolute number of test labels. If None,
        the value is automatically set to the complement of the train size.

    train_size : float, int, or None (default is None)
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the labels to include in the train split. If
        int, represents the absolute number of train labels. If None,
        the value is automatically set to the complement of the test size.

    random_state : int or RandomState
        Pseudo-random number generator state used for random sampling.
     __init__ N/A N/A self n_iter test_size train_size random_state N/A 5 0.2 None None N/A N/A N/A N/A N/A super LabelShuffleSplit self __init__ n_iter n_iter test_size test_size train_size train_size random_state random_state N/A _iter_indices N/A N/A self X y labels N/A N/A N/A N/A labels None N/A N/A N/A ValueError The labels parameter should not be None N/A N/A classes label_indices N/A N/A np unique labels return_inverse True N/A N/A label_train label_test N/A N/A N/A super LabelShuffleSplit self _iter_indices X classes N/A N/A train N/A N/A np flatnonzero N/A N/A np in1d label_indices label_train N/A test N/A N/A np flatnonzero N/A N/A np in1d label_indices label_test N/A N/A N/A train test N/A N/A StratifiedShuffleSplit N/A BaseShuffleSplit N/A N/A Stratified ShuffleSplit cross-validator

    Provides train/test indices to split data in train/test sets.

    This cross-validation object is a merge of StratifiedKFold and
    ShuffleSplit, which returns stratified randomized folds. The folds
    are made by preserving the percentage of samples for each class.

    Note: like the ShuffleSplit strategy, stratified random splits
    do not guarantee that all folds will be different, although this is
    still very likely for sizeable datasets.

    Read more in the :ref:`User Guide <cross_validation>`.

    Parameters
    ----------
    n_iter : int (default 10)
        Number of re-shuffling & splitting iterations.

    test_size : float (default 0.1), int, or None
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the dataset to include in the test split. If
        int, represents the absolute number of test samples. If None,
        the value is automatically set to the complement of the train size.

    train_size : float, int, or None (default is None)
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the dataset to include in the train split. If
        int, represents the absolute number of train samples. If None,
        the value is automatically set to the complement of the test size.

    random_state : int or RandomState
        Pseudo-random number generator state used for random sampling.

    Examples
    --------
    >>> from sklearn.model_selection import StratifiedShuffleSplit
    >>> X = np.array([[1, 2], [3, 4], [1, 2], [3, 4]])
    >>> y = np.array([0, 0, 1, 1])
    >>> sss = StratifiedShuffleSplit(n_iter=3, test_size=0.5, random_state=0)
    >>> sss.get_n_splits(X, y)
    3
    >>> print(sss)       # doctest: +ELLIPSIS
    StratifiedShuffleSplit(n_iter=3, random_state=0, ...)
    >>> for train_index, test_index in sss.split(X, y):
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    TRAIN: [1 2] TEST: [3 0]
    TRAIN: [0 2] TEST: [1 3]
    TRAIN: [0 2] TEST: [3 1]
     __init__ N/A N/A self n_iter test_size train_size random_state N/A 10 0.1 None None N/A N/A N/A N/A N/A super StratifiedShuffleSplit self __init__ n_iter test_size train_size random_state N/A _iter_indices N/A N/A self X y labels N/A None N/A N/A n_samples N/A _num_samples X N/A N/A n_train n_test N/A _validate_shuffle_split n_samples N/A self test_size N/A self train_size N/A N/A classes y_indices N/A N/A np unique y return_inverse True N/A n_classes N/A N/A classes shape N/A 0 N/A class_counts N/A bincount y_indices N/A N/A N/A N/A np min class_counts 2 N/A N/A N/A ValueError The least populated class in y has only 1 member, which is too few. The minimum number of labels for any class cannot be less than 2. N/A N/A n_train n_classes N/A N/A N/A ValueError N/A The train_size = %d should be greater or equal to the number of classes = %d N/A n_train n_classes N/A N/A n_test n_classes N/A N/A N/A ValueError N/A The test_size = %d should be greater or equal to the number of classes = %d N/A n_test n_classes N/A rng N/A check_random_state N/A self random_state N/A p_i N/A class_counts N/A float n_samples N/A n_i N/A N/A N/A N/A np round N/A n_train p_i astype int N/A t_i N/A N/A np minimum N/A class_counts n_i N/A N/A N/A N/A np round N/A n_test p_i astype int N/A _ N/A range N/A self n_iter N/A N/A train N/A N/A test N/A N/A N/A i class_i N/A enumerate classes N/A N/A permutation N/A N/A rng permutation N/A class_counts N/A i N/A perm_indices_class_i N/A N/A N/A N/A np where N/A y class_i N/A 0 N/A permutation N/A N/A N/A train extend N/A perm_indices_class_i N/A N/A n_i N/A i N/A N/A N/A test extend N/A perm_indices_class_i N/A N/A n_i N/A i N/A N/A n_i N/A i N/A t_i N/A i N/A N/A N/A N/A len train N/A len test N/A n_train n_test N/A N/A missing_indices N/A N/A N/A np where N/A N/A bincount N/A train test minlength N/A len y 0 N/A 0 N/A missing_indices N/A N/A rng permutation missing_indices N/A n_missing_train N/A n_train N/A len train N/A n_missing_test N/A n_test N/A len test N/A N/A n_missing_train 0 N/A N/A N/A N/A train extend N/A missing_indices N/A n_missing_train N/A N/A n_missing_test 0 N/A N/A N/A N/A test extend N/A missing_indices N/A N/A n_missing_test N/A train N/A N/A rng permutation train N/A test N/A N/A rng permutation test N/A N/A N/A train test N/A split N/A N/A self X y labels N/A None N/A N/A Generate indices to split data into training and test set.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            Training data, where n_samples is the number of samples
            and n_features is the number of features.

        y : array-like, shape (n_samples,)
            The target variable for supervised learning problems.

        labels : array-like, with shape (n_samples,), optional
            Group labels for the samples used while splitting the dataset into
            train/test set.

        Returns
        -------
        train : ndarray
            The training set indices for that split.

        test : ndarray
            The testing set indices for that split.
         N/A N/A N/A N/A super StratifiedShuffleSplit self split X y labels N/A N/A _validate_shuffle_split_init N/A N/A test_size train_size N/A N/A N/A Validation helper to check the test_size and train_size at init

    NOTE This does not take into account the number of samples which is known
    only at split
     N/A N/A N/A test_size None N/A train_size None N/A N/A N/A ValueError test_size and train_size can not both be None N/A N/A test_size None N/A N/A N/A N/A N/A N/A N/A np asarray test_size dtype kind f N/A N/A N/A test_size 1.0 N/A N/A N/A ValueError N/A test_size=%f should be smaller than 1.0 or be an integer test_size N/A N/A N/A N/A N/A N/A N/A np asarray test_size dtype kind i N/A N/A N/A ValueError N/A Invalid value for test_size: %r test_size N/A N/A train_size None N/A N/A N/A N/A N/A N/A N/A np asarray train_size dtype kind f N/A N/A N/A train_size 1.0 N/A N/A N/A ValueError N/A train_size=%f should be smaller than 1.0 or be an integer train_size N/A N/A N/A N/A N/A N/A N/A N/A np asarray test_size dtype kind f N/A N/A train_size test_size 1.0 N/A N/A N/A ValueError N/A The sum of test_size and train_size = %f, should be smaller than 1.0. Reduce test_size and/or train_size. N/A train_size test_size N/A N/A N/A N/A N/A N/A N/A np asarray train_size dtype kind i N/A N/A N/A ValueError N/A Invalid value for train_size: %r train_size N/A _validate_shuffle_split N/A N/A n_samples test_size train_size N/A N/A N/A 
    Validation helper to check if the test/test sizes are meaningful wrt to the
    size of the data (n_samples)
     N/A N/A N/A test_size None N/A N/A N/A N/A N/A np asarray test_size dtype kind i N/A test_size n_samples N/A N/A N/A ValueError N/A test_size=%d should be smaller than the number of samples %d N/A test_size n_samples N/A N/A N/A train_size None N/A N/A N/A N/A N/A np asarray train_size dtype kind i N/A train_size n_samples N/A N/A N/A ValueError N/A train_size=%d should be smaller than the number of samples %d N/A train_size n_samples N/A N/A N/A N/A N/A N/A np asarray test_size dtype kind f N/A N/A n_test N/A ceil N/A test_size n_samples N/A N/A N/A N/A N/A N/A N/A np asarray test_size dtype kind i N/A N/A n_test N/A float test_size N/A N/A train_size None N/A N/A n_train N/A n_samples n_test N/A N/A N/A N/A N/A N/A N/A np asarray train_size dtype kind f N/A N/A n_train N/A floor N/A train_size n_samples N/A N/A n_train N/A float train_size N/A N/A test_size None N/A N/A n_test N/A n_samples n_train N/A N/A N/A n_train n_test n_samples N/A N/A N/A ValueError N/A The sum of train_size and test_size = %d, should be smaller than the number of samples %d. Reduce test_size and/or train_size. N/A N/A n_train n_test n_samples N/A N/A N/A int n_train N/A int n_test N/A PredefinedSplit N/A BaseCrossValidator N/A N/A Predefined split cross-validator

    Splits the data into training/test set folds according to a predefined
    scheme. Each sample can be assigned to at most one test set fold, as
    specified by the user through the ``test_fold`` parameter.

    Read more in the :ref:`User Guide <cross_validation>`.

    Examples
    --------
    >>> from sklearn.model_selection import PredefinedSplit
    >>> X = np.array([[1, 2], [3, 4], [1, 2], [3, 4]])
    >>> y = np.array([0, 0, 1, 1])
    >>> test_fold = [0, 1, -1, 1]
    >>> ps = PredefinedSplit(test_fold)
    >>> ps.get_n_splits()
    2
    >>> print(ps)       # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
    PredefinedSplit(test_fold=array([ 0,  1, -1,  1]))
    >>> for train_index, test_index in ps.split():
    ...    print("TRAIN:", train_index, "TEST:", test_index)
    ...    X_train, X_test = X[train_index], X[test_index]
    ...    y_train, y_test = y[train_index], y[test_index]
    TRAIN: [1 2 3] TEST: [0]
    TRAIN: [0 2] TEST: [1 3]
     __init__ N/A N/A self test_fold N/A N/A N/A N/A self test_fold N/A N/A np array test_fold dtype N/A np int N/A N/A self test_fold N/A column_or_1d N/A self test_fold N/A N/A self unique_folds N/A N/A np unique N/A self test_fold N/A N/A self unique_folds N/A N/A self unique_folds N/A N/A N/A self unique_folds -1 N/A split N/A N/A self X y labels N/A None None None N/A N/A Generate indices to split data into training and test set.

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.

        Returns
        -------
        train : ndarray
            The training set indices for that split.

        test : ndarray
            The testing set indices for that split.
         N/A ind N/A N/A np arange N/A len N/A self test_fold N/A test_index N/A N/A self _iter_test_masks N/A N/A train_index N/A ind N/A N/A N/A np logical_not test_index N/A test_index N/A ind N/A test_index N/A N/A N/A train_index test_index N/A _iter_test_masks N/A N/A self N/A N/A N/A Generates boolean masks corresponding to test sets. N/A f N/A self unique_folds N/A N/A test_index N/A N/A N/A np where N/A N/A self test_fold f N/A 0 N/A test_mask N/A N/A np zeros N/A len N/A self test_fold dtype N/A np bool N/A N/A test_mask N/A test_index True N/A N/A test_mask N/A get_n_splits N/A N/A self X y labels N/A None None None N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.

        Returns
        -------
        n_splits : int
            Returns the number of splitting iterations in the cross-validator.
         N/A N/A len N/A self unique_folds N/A N/A _CVIterableWrapper N/A BaseCrossValidator N/A N/A Wrapper class for old style cv objects and iterables. __init__ N/A N/A self cv N/A N/A N/A N/A self cv cv N/A get_n_splits N/A N/A self X y labels N/A None None None N/A N/A Returns the number of splitting iterations in the cross-validator

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.

        Returns
        -------
        n_splits : int
            Returns the number of splitting iterations in the cross-validator.
         N/A N/A len N/A self cv N/A split N/A N/A self X y labels N/A None None None N/A N/A Generate indices to split data into training and test set.

        Parameters
        ----------
        X : object
            Always ignored, exists for compatibility.

        y : object
            Always ignored, exists for compatibility.

        labels : object
            Always ignored, exists for compatibility.

        Returns
        -------
        train : ndarray
            The training set indices for that split.

        test : ndarray
            The testing set indices for that split.
         N/A N/A train test N/A self cv N/A N/A N/A N/A train test N/A N/A check_cv N/A N/A cv y classifier N/A 3 None False N/A N/A Input checker utility for building a cross-validator

    Parameters
    ----------
    cv : int, cross-validation generator or an iterable, optional
        Determines the cross-validation splitting strategy.
        Possible inputs for cv are:
          - None, to use the default 3-fold cross-validation,
          - integer, to specify the number of folds.
          - An object to be used as a cross-validation generator.
          - An iterable yielding train/test splits.

        For integer/None inputs, if classifier is True and ``y`` is either
        binary or multiclass, :class:`StratifiedKFold` used. In all other
        cases, :class:`KFold` is used.

        Refer :ref:`User Guide <cross_validation>` for the various
        cross-validation strategies that can be used here.

    y : array-like, optional
        The target variable for supervised learning problems.

    classifier : boolean, optional, default False
        Whether the task is a classification task, in which case
        stratified KFold will be used.

    Returns
    -------
    checked_cv : a cross-validator instance.
        The return value is a cross-validator which generates the train/test
        splits via the ``split`` method.
     N/A N/A cv None N/A N/A cv 3 N/A N/A isinstance cv N/A numbers Integral N/A N/A N/A classifier N/A y None N/A N/A type_of_target y N/A binary multiclass N/A N/A N/A StratifiedKFold cv N/A N/A N/A KFold cv N/A N/A N/A N/A hasattr cv split N/A isinstance cv str N/A N/A N/A N/A N/A isinstance cv Iterable N/A isinstance cv str N/A N/A N/A ValueError N/A Expected cv as an integer, cross-validation object (from sklearn.model_selection) or an iterable. Got %s. cv N/A N/A _CVIterableWrapper cv N/A cv N/A train_test_split N/A N/A N/A arrays options N/A N/A Split arrays or matrices into random train and test subsets

    Quick utility that wraps input validation and
    ``next(ShuffleSplit().split(X, y))`` and application to input data
    into a single call for splitting (and optionally subsampling) data in a
    oneliner.

    Read more in the :ref:`User Guide <cross_validation>`.

    Parameters
    ----------
    *arrays : sequence of indexables with same length / shape[0]

        allowed inputs are lists, numpy arrays, scipy-sparse
        matrices or pandas dataframes.

        .. versionadded:: 0.16
            preserves input type instead of always casting to numpy array.

    test_size : float, int, or None (default is None)
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the dataset to include in the test split. If
        int, represents the absolute number of test samples. If None,
        the value is automatically set to the complement of the train size.
        If train size is also None, test size is set to 0.25.

    train_size : float, int, or None (default is None)
        If float, should be between 0.0 and 1.0 and represent the
        proportion of the dataset to include in the train split. If
        int, represents the absolute number of train samples. If None,
        the value is automatically set to the complement of the test size.

    random_state : int or RandomState
        Pseudo-random number generator state used for random sampling.

    stratify : array-like or None (default is None)
        If not None, data is split in a stratified fashion, using this as
        the labels array.

    Returns
    -------
    splitting : list, length=2 * len(arrays)
        List containing train-test split of inputs.

        .. versionadded:: 0.16
            Output type is the same as the input type.

    Examples
    --------
    >>> import numpy as np
    >>> from sklearn.model_selection import train_test_split
    >>> X, y = np.arange(10).reshape((5, 2)), range(5)
    >>> X
    array([[0, 1],
           [2, 3],
           [4, 5],
           [6, 7],
           [8, 9]])
    >>> list(y)
    [0, 1, 2, 3, 4]

    >>> X_train, X_test, y_train, y_test = train_test_split(
    ...     X, y, test_size=0.33, random_state=42)
    ...
    >>> X_train
    array([[4, 5],
           [0, 1],
           [6, 7]])
    >>> y_train
    [2, 0, 3]
    >>> X_test
    array([[2, 3],
           [8, 9]])
    >>> y_test
    [1, 4]

     N/A n_arrays N/A len arrays N/A N/A n_arrays 0 N/A N/A N/A ValueError At least one array required as input N/A test_size N/A N/A options pop test_size None N/A train_size N/A N/A options pop train_size None N/A random_state N/A N/A options pop random_state None N/A stratify N/A N/A options pop stratify None N/A options N/A N/A N/A TypeError N/A Invalid parameters passed: %s N/A str options N/A N/A N/A test_size None N/A train_size None N/A N/A test_size 0.25 N/A arrays N/A indexable arrays N/A N/A stratify None N/A N/A CVClass StratifiedShuffleSplit N/A N/A CVClass ShuffleSplit N/A cv N/A CVClass test_size test_size train_size train_size random_state random_state N/A N/A train test N/A next N/A N/A cv split X N/A arrays N/A 0 y stratify N/A N/A list N/A N/A chain from_iterable N/A N/A N/A safe_indexing a train N/A safe_indexing a test N/A a arrays N/A N/A N/A train_test_split __test__ False _safe_split N/A N/A estimator X y indices train_indices N/A None N/A N/A Create subset of dataset and properly handle kernels. N/A N/A N/A hasattr estimator kernel N/A callable N/A estimator kernel N/A N/A isinstance N/A estimator kernel GPKernel N/A N/A N/A ValueError Cannot use a custom kernel function. Precompute the kernel matrix instead. N/A N/A N/A hasattr X shape N/A N/A N/A getattr estimator _pairwise False N/A N/A N/A ValueError Precomputed kernels or affinity matrices have to be passed as arrays or sparse matrices. N/A X_subset N/A N/A X N/A index N/A index indices N/A N/A N/A getattr estimator _pairwise False N/A N/A N/A N/A N/A X shape N/A 0 N/A N/A X shape N/A 1 N/A N/A N/A ValueError X should be a square kernel matrix N/A N/A train_indices None N/A N/A X_subset N/A X N/A N/A N/A np ix_ indices indices N/A N/A X_subset N/A X N/A N/A N/A np ix_ indices train_indices N/A N/A X_subset N/A safe_indexing X indices N/A N/A y None N/A N/A y_subset N/A safe_indexing y indices N/A N/A y_subset None N/A N/A X_subset y_subset N/A _build_repr N/A N/A self N/A N/A N/A cls N/A self __class__ N/A init N/A getattr N/A cls __init__ deprecated_original N/A cls __init__ N/A init_signature N/A signature init N/A N/A init N/A object __init__ N/A N/A args N/A N/A N/A args N/A sorted N/A N/A p name N/A p N/A N/A N/A init_signature parameters values N/A N/A N/A p name self N/A N/A p kind N/A p VAR_KEYWORD N/A class_name N/A N/A self __class__ __name__ N/A params N/A dict N/A key args N/A N/A N/A N/A warnings simplefilter always DeprecationWarning N/A N/A N/A N/A N/A warnings catch_warnings record True w N/A N/A value N/A getattr self key None N/A N/A N/A len w N/A N/A N/A w N/A 0 category DeprecationWarning N/A N/A N/A N/A N/A N/A N/A warnings filters pop 0 N/A N/A params N/A key value N/A N/A %s(%s) N/A class_name N/A _pprint params offset N/A len class_name N/A