e91a752ee0c7a903af2fa85aa558222eed15d549,Orange/widgets/regression/tests/test_owknnregression.py,TestOWKNNRegression,setUp,#TestOWKNNRegression#,9

Before Change


            x.setCurrentIndex(i)

        metrics = self.widget.metrics
        weights = self.widget.weights
        nn_spin = self.widget.n_neighbors_spin
        nn_min_max = [nn_spin.minimum(), nn_spin.maximum()]
        self.gui_to_params = [
            GuiToParam("metric", self.widget.metrics_combo,
                       lambda x: x.currentText().lower(),
                       combo_set_value, metrics, list(range(len(metrics)))),
            GuiToParam("weights", self.widget.weights_combo,
                       lambda x: x.currentText().lower(),
                       combo_set_value, weights, list(range(len(weights)))),
            GuiToParam("n_neighbors", nn_spin, lambda x: x.value(),
                       lambda i, x: x.setValue(i), nn_min_max, nn_min_max)]

After Change


        self.widget = self.create_widget(OWKNNRegression,
                                         stored_settings={"auto_apply": False})
        self.init()
        self.parameters = [
            ParameterMapping("metric", self.widget.metrics_combo,
                             self.widget.metrics),
            ParameterMapping("weights", self.widget.weights_combo,
                             self.widget.weights),
            ParameterMapping("n_neighbors", self.widget.n_neighbors_spin)]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 28

Instances


Project Name: biolab/orange3
Commit Name: e91a752ee0c7a903af2fa85aa558222eed15d549
Time: 2016-08-05
Author: tankovesna@hotmail.com
File Name: Orange/widgets/regression/tests/test_owknnregression.py
Class Name: TestOWKNNRegression
Method Name: setUp


Project Name: biolab/orange3
Commit Name: e91a752ee0c7a903af2fa85aa558222eed15d549
Time: 2016-08-05
Author: tankovesna@hotmail.com
File Name: Orange/widgets/regression/tests/test_owknnregression.py
Class Name: TestOWKNNRegression
Method Name: setUp


Project Name: biolab/orange3
Commit Name: e91a752ee0c7a903af2fa85aa558222eed15d549
Time: 2016-08-05
Author: tankovesna@hotmail.com
File Name: Orange/widgets/classify/tests/test_owknnclassification.py
Class Name: TestOWKNNLearner
Method Name: setUp


Project Name: biolab/orange3
Commit Name: e91a752ee0c7a903af2fa85aa558222eed15d549
Time: 2016-08-05
Author: tankovesna@hotmail.com
File Name: Orange/widgets/regression/tests/test_owadaboostregression.py
Class Name: TestOWAdaBoostRegression
Method Name: setUp