Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
11c78526
"vscode:/vscode.git/clone" did not exist on "81f459474674bdacd45577d728a8c7a0bfa16cc2"
Commit
11c78526
authored
Jul 27, 2017
by
Laurae
Committed by
Qiwei Ye
Jul 27, 2017
Browse files
Python CV should be stratified by default (#734)
parent
a3c63ff7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python-package/lightgbm/engine.py
python-package/lightgbm/engine.py
+2
-2
No files found.
python-package/lightgbm/engine.py
View file @
11c78526
...
...
@@ -232,7 +232,7 @@ class CVBooster(object):
return
handlerFunction
def
_make_n_folds
(
full_data
,
folds
,
nfold
,
params
,
seed
,
fpreproc
=
None
,
stratified
=
Fals
e
,
shuffle
=
True
):
def
_make_n_folds
(
full_data
,
folds
,
nfold
,
params
,
seed
,
fpreproc
=
None
,
stratified
=
Tru
e
,
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
=
Fals
e
,
shuffle
=
True
,
folds
=
None
,
nfold
=
5
,
stratified
=
Tru
e
,
shuffle
=
True
,
metrics
=
None
,
fobj
=
None
,
feval
=
None
,
init_model
=
None
,
feature_name
=
'auto'
,
categorical_feature
=
'auto'
,
early_stopping_rounds
=
None
,
fpreproc
=
None
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment