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
cc99f0d3
Commit
cc99f0d3
authored
Nov 25, 2018
by
Nikita Titov
Committed by
Guolin Ke
Nov 26, 2018
Browse files
[python] fixed result shape in case of predict_proba with raw_score arg
parent
0c4bb89d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+1
-1
No files found.
python-package/lightgbm/sklearn.py
View file @
cc99f0d3
...
@@ -796,7 +796,7 @@ class LGBMClassifier(LGBMModel, _LGBMClassifierBase):
...
@@ -796,7 +796,7 @@ class LGBMClassifier(LGBMModel, _LGBMClassifierBase):
"""
"""
result
=
super
(
LGBMClassifier
,
self
).
predict
(
X
,
raw_score
,
num_iteration
,
result
=
super
(
LGBMClassifier
,
self
).
predict
(
X
,
raw_score
,
num_iteration
,
pred_leaf
,
pred_contrib
,
**
kwargs
)
pred_leaf
,
pred_contrib
,
**
kwargs
)
if
self
.
_n_classes
>
2
or
pred_leaf
or
pred_contrib
:
if
self
.
_n_classes
>
2
or
raw_score
or
pred_leaf
or
pred_contrib
:
return
result
return
result
else
:
else
:
return
np
.
vstack
((
1.
-
result
,
result
)).
transpose
()
return
np
.
vstack
((
1.
-
result
,
result
)).
transpose
()
...
...
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