Skip to content

Commit b7f6f19

Browse files
pprettGaelVaroquaux
authored andcommitted
added test to expose the predict_proba w/ sparse matrix regression
1 parent 4a3b4a7 commit b7f6f19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sklearn/linear_model/tests/test_sgd.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def decision_function(self, X, *args, **kw):
2828
X = sp.csr_matrix(X)
2929
return SGDClassifier.decision_function(self, X, *args, **kw)
3030

31+
def predict_proba(self, X, *args, **kw):
32+
X = sp.csr_matrix(X)
33+
return SGDClassifier.predict_proba(self, X, *args, **kw)
34+
3135

3236
class SparseSGDRegressor(SGDRegressor):
3337

0 commit comments

Comments
 (0)