Skip to content

Commit 28dcc2c

Browse files
GaelVaroquauxFabian Pedregosa
authored and
Fabian Pedregosa
committed
COSMIT: Better fix for continuity in SVMs.
1 parent 847d002 commit 28dcc2c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scikits/learn/svm/base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class frequencies.
109109
self._set_params(**params)
110110

111111
X = np.asanyarray(X, dtype=np.float64, order='C')
112-
y = np.asanyarray(y, dtype=np.float64)
112+
y = np.asanyarray(y, dtype=np.float64, order='C')
113113
sample_weight = np.asanyarray(sample_weight, dtype=np.float64)
114114

115115
if hasattr(self, 'kernel_function'):
@@ -138,8 +138,7 @@ class frequencies.
138138

139139
self.support_, self.support_vectors_, self.n_support_, \
140140
self.dual_coef_, self.intercept_, self.label_, self.probA_, \
141-
self.probB_ = libsvm.fit(
142-
np.ascontiguousarray(X), np.ascontiguousarray(y),
141+
self.probB_ = libsvm.fit(X, y,
143142
svm_type=solver_type, sample_weight=sample_weight,
144143
class_weight=class_weight,
145144
class_weight_label=class_weight_label,

0 commit comments

Comments
 (0)