Skip to content

Commit 35e6188

Browse files
authored
Merge pull request #1878 from pavlin-policar/fix-svr-update
[FIX] OWSVR: Update learner when SVR type changes
2 parents 075086f + ad491c1 commit 35e6188

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

Orange/widgets/regression/owsvmregression.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,30 @@ class OWSVMRegression(OWBaseSVM):
3636
def _add_type_box(self):
3737
form = QGridLayout()
3838
self.type_box = box = gui.radioButtonsInBox(
39-
self.controlArea, self, "svrtype", [], box="SVR Type",
40-
orientation=form)
39+
self.controlArea, self, "svrtype", [], box="SVR Type",
40+
orientation=form, callback=self.settings_changed)
4141

42-
self.epsilon_radio = gui.appendRadioButton(box, "ε-SVR",
43-
addToLayout=False)
44-
self.epsilon_C_spin = gui.doubleSpin(box, self, "epsilon_C", 0.1, 512.0,
45-
0.1, decimals=2, addToLayout=False)
46-
self.epsilon_spin = gui.doubleSpin(box, self, "epsilon", 0.1, 512.0,
47-
0.1, decimals=2, addToLayout=False)
42+
self.epsilon_radio = gui.appendRadioButton(
43+
box, "ε-SVR", addToLayout=False)
44+
self.epsilon_C_spin = gui.doubleSpin(
45+
box, self, "epsilon_C", 0.1, 512.0, 0.1, decimals=2,
46+
addToLayout=False, callback=self.settings_changed)
47+
self.epsilon_spin = gui.doubleSpin(
48+
box, self, "epsilon", 0.1, 512.0, 0.1, decimals=2,
49+
addToLayout=False, callback=self.settings_changed)
4850
form.addWidget(self.epsilon_radio, 0, 0, Qt.AlignLeft)
4951
form.addWidget(QLabel("Cost (C):"), 0, 1, Qt.AlignRight)
5052
form.addWidget(self.epsilon_C_spin, 0, 2)
5153
form.addWidget(QLabel("Loss epsilon (ε):"), 1, 1, Qt.AlignRight)
5254
form.addWidget(self.epsilon_spin, 1, 2)
5355

5456
self.nu_radio = gui.appendRadioButton(box, "ν-SVR", addToLayout=False)
55-
self.nu_C_spin = gui.doubleSpin(box, self, "nu_C", 0.1, 512.0, 0.1,
56-
decimals=2, addToLayout=False)
57-
self.nu_spin = gui.doubleSpin(box, self, "nu", 0.05, 1.0, 0.05,
58-
decimals=2, addToLayout=False)
57+
self.nu_C_spin = gui.doubleSpin(
58+
box, self, "nu_C", 0.1, 512.0, 0.1, decimals=2, addToLayout=False,
59+
callback=self.settings_changed)
60+
self.nu_spin = gui.doubleSpin(
61+
box, self, "nu", 0.05, 1.0, 0.05, decimals=2, addToLayout=False,
62+
callback=self.settings_changed)
5963
form.addWidget(self.nu_radio, 2, 0, Qt.AlignLeft)
6064
form.addWidget(QLabel("Cost (C):"), 2, 1, Qt.AlignRight)
6165
form.addWidget(self.nu_C_spin, 2, 2)

0 commit comments

Comments
 (0)