diff --git a/Orange/widgets/model/owknn.py b/Orange/widgets/model/owknn.py index f21ca91bde6..40df819c4c3 100644 --- a/Orange/widgets/model/owknn.py +++ b/Orange/widgets/model/owknn.py @@ -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) diff --git a/Orange/widgets/model/owneuralnetwork.py b/Orange/widgets/model/owneuralnetwork.py index 72da1145a4d..59d18b10cff 100644 --- a/Orange/widgets/model/owneuralnetwork.py +++ b/Orange/widgets/model/owneuralnetwork.py @@ -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) diff --git a/Orange/widgets/model/owrules.py b/Orange/widgets/model/owrules.py index 959e6351591..1983e8861ae 100644 --- a/Orange/widgets/model/owrules.py +++ b/Orange/widgets/model/owrules.py @@ -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) diff --git a/Orange/widgets/model/owsgd.py b/Orange/widgets/model/owsgd.py index 5cbc343d20b..17a734d955f 100644 --- a/Orange/widgets/model/owsgd.py +++ b/Orange/widgets/model/owsgd.py @@ -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 diff --git a/Orange/widgets/tests/base.py b/Orange/widgets/tests/base.py index eaa1b125309..4d829a64f82 100644 --- a/Orange/widgets/tests/base.py +++ b/Orange/widgets/tests/base.py @@ -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()