d2cc0fb493b359fcbcd25410d1ddfe50954766aa,Orange/classification/linear_regression.py,LinearRegressionLearner,fit,#LinearRegressionLearner#Any#Any#Any#,6

Before Change


class LinearRegressionLearner(classification.Fitter):
    def fit(self, X, Y, W):
        clf = LinearRegression()
        return LinearRegressionPredictor(clf.fit(X, Y.reshape(-1)))


class LinearRegressionPredictor(classification.Model):

After Change


            raise ValueError("Linear regression does not support "
                             "unknown values")

        theta = np.zeros(X.shape[1])
        theta, cost, ret = fmin_l_bfgs_b(self.cost_grad, theta,
                                         args=(X, Y.ravel()), **self.fmin_args)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: biolab/orange3
Commit Name: d2cc0fb493b359fcbcd25410d1ddfe50954766aa
Time: 2013-06-03
Author: jure.zbontar@gmail.com
File Name: Orange/classification/linear_regression.py
Class Name: LinearRegressionLearner
Method Name: fit


Project Name: osmr/imgclsmob
Commit Name: 09e4a76102ff4a06a835180237ea171eb475985c
Time: 2018-09-19
Author: osemery@gmail.com
File Name: keras_/models/mobilenet.py
Class Name:
Method Name: _test


Project Name: cjekel/piecewise_linear_fit_py
Commit Name: 1f77722c794cc943a198c31800848d78ee11a4a6
Time: 2017-03-31
Author: cjekel@gmail.com
File Name: examples/test0.py
Class Name:
Method Name:


Project Name: lyst/lightfm
Commit Name: 1c952e9a584ac173dded00b5b649750d896d9c57
Time: 2016-04-15
Author: maciejkula@gmail.com
File Name: tests/test_api.py
Class Name:
Method Name: test_sample_weight