Skip to content

Commit

Permalink
OWSVM: Add callbacks to regression widget
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlin-policar committed Jan 26, 2017
1 parent b679deb commit e9d0baa
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Orange/widgets/regression/owsvmregression.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ def _add_type_box(self):
form = QGridLayout()
self.type_box = box = gui.radioButtonsInBox(
self.controlArea, self, "svm_type", [], box="SVR Type",
orientation=form)
orientation=form, callback=self.settings_changed)

self.epsilon_radio = gui.appendRadioButton(
box, "ε-SVR", addToLayout=False)
self.C_spin = gui.doubleSpin(
box, self, "C", 0.1, 512.0, 0.1, decimals=2, addToLayout=False)
box, self, "C", 0.1, 512.0, 0.1, decimals=2, addToLayout=False,
callback=self.settings_changed)
self.epsilon_spin = gui.doubleSpin(
box, self, "epsilon", 0.1, 512.0, 0.1, decimals=2,
addToLayout=False)
addToLayout=False, callback=self.settings_changed)
form.addWidget(self.epsilon_radio, 0, 0, Qt.AlignLeft)
form.addWidget(QLabel("Cost (C):"), 0, 1, Qt.AlignRight)
form.addWidget(self.C_spin, 0, 2)
Expand All @@ -37,9 +38,11 @@ def _add_type_box(self):

self.nu_radio = gui.appendRadioButton(box, "ν-SVR", addToLayout=False)
self.nu_C_spin = gui.doubleSpin(
box, self, "nu_C", 0.1, 512.0, 0.1, decimals=2, addToLayout=False)
box, self, "nu_C", 0.1, 512.0, 0.1, decimals=2, addToLayout=False,
callback=self.settings_changed)
self.nu_spin = gui.doubleSpin(
box, self, "nu", 0.05, 1.0, 0.05, decimals=2, addToLayout=False)
box, self, "nu", 0.05, 1.0, 0.05, decimals=2, addToLayout=False,
callback=self.settings_changed)
form.addWidget(self.nu_radio, 2, 0, Qt.AlignLeft)
form.addWidget(QLabel("Cost (C):"), 2, 1, Qt.AlignRight)
form.addWidget(self.nu_C_spin, 2, 2)
Expand Down

0 comments on commit e9d0baa

Please sign in to comment.