facet.validation.BaseBootstrapCV#
- class facet.validation.BaseBootstrapCV(n_splits=1000, random_state=None)[source]#
Base class for bootstrap cross-validators.
- Bases
BaseCrossValidator
- Metaclasses
- Parameters
n_splits (
int
) – number of splits to generate (default: 1000)random_state (
Union
[int
,RandomState
,None
]) – random state to initialise the random generator with (optional)
Method summary
Return the number of splits generated by this cross-validator.
Generate indices to split data into training and test set.
Definitions
- get_n_splits(X=None, y=None, groups=None)[source]#
Return the number of splits generated by this cross-validator.
- Parameters
X (
Union
[ndarray
[Any
,dtype
[Any
]],DataFrame
,None
]) – for compatibility only, not usedy (
Union
[ndarray
[Any
,dtype
[Any
]],Series
,DataFrame
,None
]) – for compatibility only, not usedgroups (
Union
[_SupportsArray
[dtype
[Any
]],_NestedSequence
[_SupportsArray
[dtype
[Any
]]],bool
,int
,float
,complex
,str
,bytes
,_NestedSequence
[Union
[bool
,int
,float
,complex
,str
,bytes
]],None
]) – for compatibility only, not used
- Return type
- Returns
the number of splits
- split(X, y=None, groups=None)[source]#
Generate indices to split data into training and test set.
- Parameters
- Return type
Generator
[Tuple
[ndarray
[Any
,dtype
[int64
]],ndarray
[Any
,dtype
[int64
]]],None
,None
]- Returns
a generator yielding (train, test) tuples where train and test are numpy arrays with train and test indices, respectively