Skip to content

Commit

Permalink
Merge pull request #6526 from ales-erjavec/fixes/owneuralnetwork-name
Browse files Browse the repository at this point in the history
[FIX] Neural Network: Default learner name propagation
  • Loading branch information
janezd authored Aug 24, 2023
2 parents 0906348 + 9c0c57b commit d49a8a3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion Orange/widgets/model/owknn.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class OWKNNLearner(OWBaseLearner):
weights_options = ["Uniform", "By Distances"]
metrics_options = ["Euclidean", "Manhattan", "Chebyshev", "Mahalanobis"]

learner_name = Setting("kNN")
n_neighbors = Setting(5)
metric_index = Setting(0)
weight_index = Setting(0)
Expand Down
1 change: 0 additions & 1 deletion Orange/widgets/model/owneuralnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class OWNNLearner(OWBaseLearner):
solver = ["lbfgs", "sgd", "adam"]
solv_lbl = ["L-BFGS-B", "SGD", "Adam"]

learner_name = Setting("Neural Network")
hidden_layers_input = Setting("100,")
activation_index = Setting(3)
solver_index = Setting(2)
Expand Down
1 change: 0 additions & 1 deletion Orange/widgets/model/owrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ class OWRuleLearner(OWBaseLearner):
storage_measures = ["entropy", "laplace", "wracc"]

# default parameter values
learner_name = Setting("CN2 rule inducer")
rule_ordering = Setting(0)
covering_algorithm = Setting(0)
gamma = Setting(0.7)
Expand Down
1 change: 0 additions & 1 deletion Orange/widgets/model/owsgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class Outputs(OWBaseLearner.Outputs):
('Optimal', 'optimal'),
('Inverse scaling', 'invscaling'))

learner_name = Setting('SGD')
#: Loss function index for classification problems
cls_loss_function_index = Setting(0)
#: Epsilon loss function parameter for classification problems
Expand Down
5 changes: 3 additions & 2 deletions Orange/widgets/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,9 @@ def test_output_learner_name(self):
new_name = "Learner Name"
self.click_apply()
self.assertEqual(self.widget.learner.name,
self.widget.name_line_edit.text()
or self.widget.name_line_edit.placeholderText())
self.widget.effective_learner_name())
self.assertEqual(self.widget.effective_learner_name(),
self.widget.name_line_edit.placeholderText())
self.widget.name_line_edit.setText(new_name)
self.click_apply()
self.wait_until_stop_blocking()
Expand Down

0 comments on commit d49a8a3

Please sign in to comment.