3f600018f9ce132783e7e21c22fd1528b08204f4,pyglmnet/pyglmnet.py,GLM,predict_proba,#GLM#Any#,911

Before Change



        yhat = _lmb(self.distr, self.beta0_, self.beta_, X, self.eta,
                    fit_intercept=True)
        yhat = np.asarray(yhat)
        return yhat

    def fit_predict(self, X, y):
        Fit the model and predict on the same data.

After Change


        X = check_array(X, accept_sparse=False)
        check_is_fitted(self, "is_fitted_")

        if self.distr in ["binomial", "probit"]:
            return self._predict_proba(X)
        else:
            warnings.warn("This is only applicable for \
                           the binomial distribution. \
                           We returns predict as an output here.")
            return self.predict(X)

    def fit_predict(self, X, y):
        Fit the model and predict on the same data.

        Parameters
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: glm-tools/pyglmnet
Commit Name: 3f600018f9ce132783e7e21c22fd1528b08204f4
Time: 2020-02-20
Author: my.titipat@gmail.com
File Name: pyglmnet/pyglmnet.py
Class Name: GLM
Method Name: predict_proba


Project Name: analysiscenter/batchflow
Commit Name: 4239f62068ceee96ea5e0a3b8b7228202e70a320
Time: 2017-12-14
Author: a.kozhevin@analysiscenter.ru
File Name: dataset/models/tf/layers/conv.py
Class Name:
Method Name: _calc_size


Project Name: pandas-dev/pandas
Commit Name: 191f859673b755237a99d24f8f4bed4b738870dc
Time: 2020-11-12
Author: jbrockmendel@gmail.com
File Name: pandas/core/indexes/category.py
Class Name: CategoricalIndex
Method Name: _convert_list_indexer