Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions rehline/_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,17 @@ def fit(self, X, sample_weight=None):
trace_freq=self.trace_freq,
)

self.opt_result_ = result
# self.opt_result_ = result
# primal solution
self.coef_ = result.beta
self.coef_ = result.beta.copy()
# dual solution
self._Lambda = result.Lambda
self._Gamma = result.Gamma
self._xi = result.xi
self._Lambda = result.Lambda.copy()
self._Gamma = result.Gamma.copy()
self._xi = result.xi.copy()
# algo convergence
self.n_iter_ = result.niter
self.dual_obj_ = result.dual_objfns
self.primal_obj_ = result.primal_objfns
self.dual_obj_ = list(result.dual_objfns)
self.primal_obj_ = list(result.primal_objfns)

if self.n_iter_ >= self.max_iter:
warnings.warn(
Expand Down Expand Up @@ -447,17 +447,17 @@ def fit(self, X, y, sample_weight=None):
trace_freq=self.trace_freq,
)

self.opt_result_ = result
# self.opt_result_ = result
# primal solution
self.coef_ = result.beta
self.coef_ = result.beta.copy()
# dual solution
self._Lambda = result.Lambda
self._Gamma = result.Gamma
self._xi = result.xi
self._Lambda = result.Lambda.copy()
self._Gamma = result.Gamma.copy()
self._xi = result.xi.copy()
# algo convergence
self.n_iter_ = result.niter
self.dual_obj_ = result.dual_objfns
self.primal_obj_ = result.primal_objfns
self.dual_obj_ = list(result.dual_objfns)
self.primal_obj_ = list(result.primal_objfns)

if self.n_iter_ >= self.max_iter:
warnings.warn(
Expand Down Expand Up @@ -699,18 +699,18 @@ def fit(self, X, y, sample_weight=None):
trace_freq=self.trace_freq,
)

self.opt_result_ = result
# self.opt_result_ = result
# primal solution
self.coef_ = result.beta
self.coef_ = result.beta.copy()
# dual solution
self._Lambda = result.Lambda
self._Gamma = result.Gamma
self._xi = result.xi
self._Lambda = result.Lambda.copy()
self._Gamma = result.Gamma.copy()
self._xi = result.xi.copy()
self._mu = result.mu
# algo convergence
self.n_iter_ = result.niter
self.dual_obj_ = result.dual_objfns
self.primal_obj_ = result.primal_objfns
self.dual_obj_ = list(result.dual_objfns)
self.primal_obj_ = list(result.primal_objfns)

if self.n_iter_ >= self.max_iter:
warnings.warn(
Expand Down Expand Up @@ -934,18 +934,18 @@ def fit(self, X, y, sample_weight=None):
trace_freq=self.trace_freq,
)

self.opt_result_ = result
# self.opt_result_ = result
# primal solution
self.coef_ = result.beta[:-n_qt]
self.intercept_ = result.beta[-n_qt:]
self.coef_ = result.beta[:-n_qt].copy()
self.intercept_ = result.beta[-n_qt:].copy()
# dual solution
self._Lambda = result.Lambda
self._Gamma = result.Gamma
self._Lambda = result.Lambda.copy()
self._Gamma = result.Gamma.copy()
self._xi = result.xi
# algo convergence
self.n_iter_ = result.niter
self.dual_obj_ = result.dual_objfns
self.primal_obj_ = result.primal_objfns
self.dual_obj_ = list(result.dual_objfns)
self.primal_obj_ = list(result.primal_objfns)

if self.n_iter_ >= self.max_iter:
warnings.warn(
Expand Down
Loading