wildboar.model_selection._cv#
Module Contents#
Classes#
Repeated random outlier cross-validator |
- class wildboar.model_selection._cv.RepeatedOutlierSplit(n_splits=None, *, test_size=0.2, n_outlier=0.05, shuffle=True, random_state=None)#
Repeated random outlier cross-validator
Yields indicies that split the dataset into training and test sets.
Note
Contrary to other cross-validation strategies, the random outlier cross-validator does not ensure that all folds will be different. Instead, the inlier samples are shuffled and new outlier samples are inserted in the training and test sets repeatedly.
- get_n_splits(X, y, groups=None)#
Returns the number of splitting iterations in the cross-validator :param X: The samples :type X: object :param y: The labels :type y: object :param groups: Always ignored, exists for compatibility. :type groups: object
- Returns:
n_splits – Returns the number of splitting iterations in the cross-validator.
- Return type:
int
- split(x, y, groups=None)#
Return training and test indicies
- Parameters:
x (object) – Always ignored, exists for compatibility.
y (object) – The labels
groups (object, optional) – Always ignored, exists for compatibility.
- Yields:
train_idx, test_idx (ndarray) – The training and test indicies
- __repr__()#
Return repr(self).