206f681e3a08d2f6079484de1ba3ea7abaf1dadc,mlxtend/regression/linear_regression.py,LinearRegression,_normal_equation,#LinearRegression#,126

Before Change



        // intercept
        y_pred = np.dot(X, w[1:])
        w[0] = np.mean(y) - np.mean(y_pred)
        return w

    def _shuffle(self, X, y):

After Change



    def _normal_equation(self, X, y):
        Solve linear regression analytically
        Xb = np.hstack((np.ones((X.shape[0], 1)), X))
        w = np.zeros(X.shape[1])
        z = np.linalg.inv(np.dot(Xb.T, Xb))
        w = np.dot(z, np.dot(Xb.T, y))
        return w
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: rasbt/mlxtend
Commit Name: 206f681e3a08d2f6079484de1ba3ea7abaf1dadc
Time: 2015-10-20
Author: mail@sebastianraschka.com
File Name: mlxtend/regression/linear_regression.py
Class Name: LinearRegression
Method Name: _normal_equation


Project Name: vitchyr/rlkit
Commit Name: 0030a2dd021c5ae0c67536ab64bbe6bf89c6493e
Time: 2018-11-27
Author: vitchyr@gmail.com
File Name: rlkit/torch/her/her.py
Class Name: HER
Method Name: _get_action_and_info


Project Name: vitchyr/rlkit
Commit Name: 77ea92f681ad145c755147267d36ec4ba59310c9
Time: 2018-12-04
Author: vitchyr@gmail.com
File Name: rlkit/torch/her/her.py
Class Name: HER
Method Name: _get_action_and_info