"src/vscode:/vscode.git/clone" did not exist on "da3b4c19dc76ed76a191d7d70098f7080495000c"
Commit 11c78526 authored by Laurae's avatar Laurae Committed by Qiwei Ye
Browse files

Python CV should be stratified by default (#734)

parent a3c63ff7
......@@ -232,7 +232,7 @@ class CVBooster(object):
return handlerFunction
def _make_n_folds(full_data, folds, nfold, params, seed, fpreproc=None, stratified=False, shuffle=True):
def _make_n_folds(full_data, folds, nfold, params, seed, fpreproc=None, stratified=True, shuffle=True):
"""
Make an n-fold list of Booster from random indices.
"""
......@@ -294,7 +294,7 @@ def _agg_cv_result(raw_results):
def cv(params, train_set, num_boost_round=10,
folds=None, nfold=5, stratified=False, shuffle=True,
folds=None, nfold=5, stratified=True, shuffle=True,
metrics=None, fobj=None, feval=None, init_model=None,
feature_name='auto', categorical_feature='auto',
early_stopping_rounds=None, fpreproc=None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment