"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "51287f07e1036b7f2b0a5abd41c276511156f802"
Commit cc99f0d3 authored by Nikita Titov's avatar Nikita Titov Committed by Guolin Ke
Browse files

[python] fixed result shape in case of predict_proba with raw_score arg

parent 0c4bb89d
......@@ -796,7 +796,7 @@ class LGBMClassifier(LGBMModel, _LGBMClassifierBase):
"""
result = super(LGBMClassifier, self).predict(X, raw_score, num_iteration,
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
else:
return np.vstack((1. - result, result)).transpose()
......
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