8000 COSMIT remove superfluous imports in svm/sparse/base.py · seckcoder/scikit-learn@a6e7178 · GitHub
[go: up one dir, main page]

Skip to content

Commit a6e7178

Browse files
committed
COSMIT remove superfluous imports in svm/sparse/base.py
1 parent 3e4b6df commit a6e7178

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

sklearn/svm/sparse/base.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ def predict_proba(self, X):
197197

198198

199199
class SparseBaseLibLinear(BaseLibLinear):
200-
201200
def fit(self, X, y, class_weight=None):
202201
"""
203202
Fit the model using X, y as training data.
@@ -215,8 +214,6 @@ def fit(self, X, y, class_weight=None):
215214
self : object
216215
Returns an instance of self.
217216
"""
218-
219-
import scipy.sparse
220217
X = scipy.sparse.csr_matrix(X)
221218
y = np.asarray(y, dtype=np.int32, order='C')
222219
if X.shape[0] != y.shape[0]:
@@ -254,7 +251,6 @@ def predict(self, X):
254251
-------
255252
C : array, shape = [n_samples]
256253
"""
257-
import scipy.sparse
258254
X = scipy.sparse.csr_matrix(X)
259255
self._check_n_features(X)
260256
X.data = np.asarray(X.data, dtype=np.float64, order='C')
@@ -283,7 +279,6 @@ def decision_function(self, X):
283279
Returns the decision function of the sample for each class
284280
in the model.
285281
"""
286-
import scipy.sparse
287282
X = scipy.sparse.csr_matrix(X)
288283
self._check_n_features(X)
289284
X.data = np.asarray(X.data, dtype=np.float64, order='C')

0 commit comments

Comments
 (0)
0