Skip to content

Commit 1683ac8

Browse files
authored
Merge pull request #17 from dataiku/bugfix/binary-classification-v11
fix binary classification prediction from v11
2 parents a84d2b5 + 4d516ba commit 1683ac8

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [Version 1.0.2] - Bugfix Release - 2022-07
4+
5+
* Fixed binary classification prediction output format to fit v11 stricter format
6+
37
## [Version 1.0.1] - Bugfix Release - 2022-04
48

59
* Fixed package requirement dependency issue with python 3.7 for the custom view

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "generalized-linear-models",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"meta": {
55
"label": "Generalized Linear Models",
66
"description": "Train and deploy Generalized Linear Models",

python-lib/generalized_linear_models/dku_glm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,8 @@ def predict(self, X):
291291
Returns the binary target
292292
"""
293293
y_pred = self.predict_target(X)
294-
y_pred_final = y_pred.reshape((len(y_pred), -1))
295294

296-
return y_pred_final > 0.5
295+
return y_pred > 0.5
297296

298297
def predict_proba(self, X):
299298
"""

0 commit comments

Comments
 (0)