4341a7775df1d34798dafa9cc7c8b480ccce21d6,fancyimpute/bayesian_ridge_regression.py,BayesianRidgeRegression,fit,#BayesianRidgeRegression#Any#Any#Any#,45

Before Change


        self.beta_estimate = multi_dot([self.inverse_covariance, X_ones.T, y])
        // now we need the estimate of the noise variance
        // reference: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/summary.lm.html
        residuals = (y - self.predict(X))
        // square all the residuals
        residuals **= 2
        self.sigma_squared_estimate = residuals.sum() / max((n - d), 1)
        self.covar = self.sigma_squared_estimate * self.inverse_covariance

After Change


        self.beta_estimate = multi_dot([self.inverse_covariance, X_ones.T, y])
        // now we need the estimate of the noise variance
        // reference: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/summary.lm.html
        pred = dot(X_ones, self.beta_estimate)
        // get the residual of the predictions and square it
        pred -= y
        pred **= 2
        sum_squared_residuals = pred.sum()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: iskandr/fancyimpute
Commit Name: 4341a7775df1d34798dafa9cc7c8b480ccce21d6
Time: 2016-01-10
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/bayesian_ridge_regression.py
Class Name: BayesianRidgeRegression
Method Name: fit


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: fdb79b730cf635480ac1b264392345936b591ad0
Time: 2020-01-10
Author: albandecrevoisier@gmail.com
File Name: src/skmultiflow/trees/nodes/active_learning_node_perceptron.py
Class Name: ActiveLearningNodePerceptron
Method Name: update_weights


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: fdb79b730cf635480ac1b264392345936b591ad0
Time: 2020-01-10
Author: albandecrevoisier@gmail.com
File Name: src/skmultiflow/trees/nodes/inactive_learning_node_perceptron.py
Class Name: InactiveLearningNodePerceptron
Method Name: update_weights