Skip to content

Commit

Permalink
fix decision_function
Browse files Browse the repository at this point in the history
  • Loading branch information
itlubber committed Jan 25, 2024
1 parent bd0faf9 commit 532774e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scorecardpipeline/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def decision_function(self, x):
xp, _ = get_namespace(x)
x = self._validate_data(x, accept_sparse="csr", reset=False)
scores = safe_sparse_dot(x, self.coef_.T, dense_output=True) + self.intercept_
return xp.reshape(scores, -1) if scores.shape[1] == 1 else scores
return xp.reshape(scores, (-1,)) if scores.shape[1] == 1 else scores

def corr(self, data, save=None, annot=True):
"""数据集的特征相关性图
Expand Down

0 comments on commit 532774e

Please sign in to comment.