Skip to content

Commit

Permalink
Logistic Regression: lint
Browse files Browse the repository at this point in the history
Test Logistic Regression: lint
  • Loading branch information
jerneju committed Apr 7, 2017
1 parent a278453 commit 44267a1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Orange/widgets/model/owlogisticregression.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from itertools import chain
import numpy as np
from AnyQt import QtWidgets
from AnyQt.QtCore import Qt

Expand Down Expand Up @@ -61,17 +61,17 @@ def add_main_layout(self):
self.set_c()

def set_c(self):
self.C = self.C_s[self.C_index]
fmt = "C={}" if self.C >= 1 else "C={:.3f}"
self.c_label.setText(fmt.format(self.C))
self.strength_C = self.C_s[self.C_index]
fmt = "C={}" if self.strength_C >= 1 else "C={:.3f}"
self.c_label.setText(fmt.format(self.strength_C))

def create_learner(self):
penalty = self.penalty_types_short[self.penalty_type]
return self.LEARNER(
penalty=penalty,
dual=self.dual,
tol=self.tol,
C=self.C,
C=self.strength_C,
fit_intercept=self.fit_intercept,
intercept_scaling=self.intercept_scaling,
preprocessors=self.preprocessors
Expand All @@ -86,7 +86,7 @@ def update_model(self):

def get_learner_parameters(self):
return (("Regularization", "{}, C={}".format(
self.penalty_types[self.penalty_type], self.C_s[self.C_index])),)
self.penalty_types[self.penalty_type], self.C_s[self.C_index])),)


def create_coef_table(classifier):
Expand Down

0 comments on commit 44267a1

Please sign in to comment.