Skip to content

Commit

Permalink
Do not modify model coef
Browse files Browse the repository at this point in the history
  • Loading branch information
lopuhin committed Sep 26, 2016
1 parent c9dc7a9 commit 267f235
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions eli5/sklearn/utils.py
Expand Up @@ -91,6 +91,7 @@ def get_coef(clf, label_id, scale=None):
))
# print("shape is ok")
not_nan = ~np.isnan(scale)
coef = coef.copy()
coef[not_nan] *= scale[not_nan]

if not has_intercept(clf):
Expand Down

0 comments on commit 267f235

Please sign in to comment.