s / shape = / .reshape() /
This commit is contained in:
parent
e034f09dd4
commit
bda15f53ee
|
|
@ -163,7 +163,7 @@ class LogisticRegression(BaseLibLinear, ClassifierMixin,
|
|||
_y = np.empty(y.shape)
|
||||
_y[np.where(y == classes[0])] = -1
|
||||
_y[np.where(y == classes[1])] = 1
|
||||
_y.shape = (1, np.size(y))
|
||||
_y = _y.reshape((1, -1))
|
||||
|
||||
den = np.max(np.abs(np.dot(_y, X)))
|
||||
if den == 0.0:
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class LogisticRegression(SparseBaseLibLinear, ClassifierMixin,
|
|||
_y = np.empty(y.shape)
|
||||
_y[np.where(y == classes[0])] = -1
|
||||
_y[np.where(y == classes[1])] = 1
|
||||
_y.shape = (1, np.size(y))
|
||||
_y = _y.reshape((1, -1))
|
||||
|
||||
den = np.max(np.abs(_y * X))
|
||||
if den == 0.0:
|
||||
|
|
|
|||
Loading…
Reference in New Issue