Skip to content

Commit

Permalink
debug ci
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasryck committed Sep 27, 2024
1 parent 47f30e5 commit 585e436
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cyanure/estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ def __init__(self, loss='square', penalty='l2', fit_intercept=False, dual=None,
self.n_threads = n_threads
self.safe = safe

if (loss == "multiclass-logistic" or loss == "logistic") and self.lambda_1 == -10.0:
self.lambda_1 = 0
elif (self.lambda_1 == -10.0):
self.lambda_1 = 0

def fit(self, X, labels, le_parameter=None):
"""
Fit the parameters.
Expand Down Expand Up @@ -298,11 +303,6 @@ def fit(self, X, labels, le_parameter=None):
if loss is None:
loss = self.loss

if (loss == "multiclass-logistic" or loss == "logistic") and self.lambda_1 == -10.0:
self.lambda_1 = 0
elif (self.lambda_1 == -10.0):
self.lambda_1 = 0

labels = np.squeeze(labels)
initial_weight, yf, nclasses = self._initialize_weight(X, labels)

Expand Down

0 comments on commit 585e436

Please sign in to comment.