Skip to content

Commit dee6e68

Browse files
author
hseo0618
committed
Apply the suggested comments.Appropriate docstring
1 parent 9938225 commit dee6e68

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

hpsklearn/estimator/_cost_fn.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ def _cost_fn(argd,
5757
n_folds: int, default is None
5858
When n_folds is not None, use K-fold cross-validation when
5959
n_folds > 2. Or, use leave-one-out cross-validation when
60-
n_folds = -1.
60+
n_folds = -1. For Group K-fold cross-validation, functions as
61+
`n_splits`.
6162
6263
kfolds_group: list or ndarray, default is None
6364
When kfolds_group is not None, use Group K-fold cross-validation
6465
with the specified groups. The length of kfolds_group must be
6566
equal to the number of samples in X.
67+
6668
shuffle: bool, default is False
6769
Whether to perform sample shuffling before splitting the
6870
data into training and validation sets.

hpsklearn/estimator/estimator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,14 @@ def fit_iter(self, X, y,
241241
n_folds: int, default is None
242242
When n_folds is not None, use K-fold cross-validation when
243243
n_folds > 2. Or, use leave-one-out cross-validation when
244-
n_folds = -1.
244+
n_folds = -1. For Group K-fold cross-validation, functions as
245+
`n_splits`.
245246
246247
kfolds_group: list or ndarray, default is None
247248
When kfolds_group is not None, use Group K-fold cross-validation
248249
with the specified groups. The length of kfolds_group must be
249250
equal to the number of samples in X.
251+
250252
cv_shuffle: bool, default is False
251253
Whether to perform sample shuffling before splitting the
252254
data into training and validation sets.
@@ -431,12 +433,14 @@ def fit(self, X, y,
431433
n_folds: int, default is None
432434
When n_folds is not None, use K-fold cross-validation when
433435
n_folds > 2. Or, use leave-one-out cross-validation when
434-
n_folds = -1.
436+
n_folds = -1. For Group K-fold cross-validation, functions as
437+
`n_splits`.
435438
436439
kfolds_group: list or ndarray, default is None
437440
When kfolds_group is not None, use Group K-fold cross-validation
438441
with the specified groups. The length of group_kfolds must be
439442
equal to the number of samples in X.
443+
440444
cv_shuffle: bool, default is False
441445
Whether to perform sample shuffling before splitting the
442446
data into training and validation sets.

tests/test_estimator/test_estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def test_crossvalidation(self):
248248

249249
class TestGroupCrossValidation(unittest.TestCase):
250250
"""
251-
Class for testing estimator with cross validation
251+
Class for testing estimator with group cross validation
252252
"""
253253

254254
def setUp(self):

0 commit comments

Comments
 (0)