ae7920e7217545121c7b6583b5799a190bc53d14,Orange/widgets/classify/tests/test_owsvmclassification.py,TestOWSVMClassification,setUp,#TestOWSVMClassification#,11

Before Change


class TestOWSVMClassification(WidgetTest):
    def setUp(self):
        self.widget = self.create_widget(OWSVMClassification)
        self.widget.spin_boxes = self.widget.findChildren(QtGui.QDoubleSpinBox)
        // max iter spin
        self.widget.spin_boxes.append(self.widget.findChildren(QtGui.QSpinBox)[0])
        // max iter checkbox
        self.widget.max_iter_check_box = self.widget.findChildren(QtGui.QCheckBox)[0]
        self.spin_boxes = self.widget.spin_boxes
        self.event_data = None

    def test_kernel_equation_run(self):
         Check if right text is written for specific kernel 

After Change


                                         stored_settings={"auto_apply": False})
        self.init()
        gamma_spin = self.widget._kernel_params[0]
        values = [self.widget._default_gamma, gamma_spin.maximum()]

        def getter():
            value = gamma_spin.value()
            return gamma_spin.specialValueText() \
                if value == gamma_spin.minimum() else value

        def setter(value):
            if value == gamma_spin.specialValueText():
                gamma_spin.setValue(gamma_spin.minimum())
            else:
                gamma_spin.setValue(value)

        self.parameters = [
            ParameterMapping("C", self.widget.c_spin),
            ParameterMapping("gamma", self.widget._kernel_params[0],
                             values=values, setter=setter, getter=getter),
            ParameterMapping("coef0", self.widget._kernel_params[1]),
            ParameterMapping("degree", self.widget._kernel_params[2]),
            ParameterMapping("tol", self.widget.tol_spin),
            ParameterMapping("max_iter", self.widget.max_iter_spin[1])]

    def test_parameters_unchecked(self):
        Check learner and model for various values of all parameters
        when Iteration limit is not checked
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: biolab/orange3
Commit Name: ae7920e7217545121c7b6583b5799a190bc53d14
Time: 2016-08-30
Author: tankovesna@hotmail.com
File Name: Orange/widgets/classify/tests/test_owsvmclassification.py
Class Name: TestOWSVMClassification
Method Name: setUp


Project Name: home-assistant/home-assistant
Commit Name: a65f196d1971757aa75819357efd9f255ea4951b
Time: 2016-07-02
Author: mail@fabian-affolter.ch
File Name: homeassistant/components/sensor/swiss_hydrological_data.py
Class Name: HydrologicalData
Method Name: update


Project Name: biolab/orange3
Commit Name: 30f7e8327c8ff9ce129b4dce42b79ba5969afe23
Time: 2016-07-22
Author: tankovesna@hotmail.com
File Name: Orange/widgets/classify/tests/test_owadaboostclassification.py
Class Name: TestOWAdaBoostClassification
Method Name: setUp