MCPcopy
hub / github.com/scikit-learn/scikit-learn / _iter_test_indices

Method _iter_test_indices

sklearn/model_selection/_split.py:217–223  ·  view source on GitHub ↗
(self, X, y=None, groups=None)

Source from the content-addressed store, hash-verified

215 """
216
217 def _iter_test_indices(self, X, y=None, groups=None):
218 n_samples = _num_samples(X)
219 if n_samples <= 1:
220 raise ValueError(
221 "Cannot perform LeaveOneOut with n_samples={}.".format(n_samples)
222 )
223 return range(n_samples)
224
225 def get_n_splits(self, X, y=None, groups=None):
226 """Returns the number of splitting iterations in the cross-validator.

Callers

nothing calls this directly

Calls 2

_num_samplesFunction · 0.90
formatMethod · 0.80

Tested by

no test coverage detected