cc42dfa0e2808a96e9022fac7da980fad13d124a,tpot/builtins/stacking_estimator.py,StackingEstimator,transform,#StackingEstimator#,70

Before Change


        X_transformed = np.copy(X)
        // add class probabilities as a synthetic feature
        if issubclass(self.estimator.__class__, ClassifierMixin) and hasattr(self.estimator, "predict_proba"):
            X_transformed = np.hstack((self.estimator.predict_proba(X), X))

        // add class prodiction as a synthetic feature
        X_transformed = np.hstack((np.reshape(self.estimator.predict(X), (-1, 1)), X_transformed))

After Change


        if issubclass(self.estimator.__class__, ClassifierMixin) and hasattr(self.estimator, "predict_proba"):
            y_pred_proba = self.estimator.predict_proba(X)
            // check all values that should be not infinity or not NAN
            if np.all(np.isfinite(y_pred_proba)):
                X_transformed = np.hstack((y_pred_proba, X))

        // add class prodiction as a synthetic feature
        X_transformed = np.hstack((np.reshape(self.estimator.predict(X), (-1, 1)), X_transformed))

        return X_transformed
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: EpistasisLab/tpot
Commit Name: cc42dfa0e2808a96e9022fac7da980fad13d124a
Time: 2019-11-05
Author: weixuanf@pennmedicine.upenn.edu
File Name: tpot/builtins/stacking_estimator.py
Class Name: StackingEstimator
Method Name: transform


Project Name: utiasSTARS/liegroups
Commit Name: 784586f02d063d39360a287422a6384f30f10d12
Time: 2017-01-30
Author: clement.leopold@gmail.com
File Name: liegroups/se2.py
Class Name: SE2
Method Name: vee


Project Name: utiasSTARS/liegroups
Commit Name: 784586f02d063d39360a287422a6384f30f10d12
Time: 2017-01-30
Author: clement.leopold@gmail.com
File Name: liegroups/se3.py
Class Name: SE3
Method Name: vee