abd0f7b5564e51a412bb7f85e040985d14eb0a4e,src/skmultiflow/meta/adaptive_random_forests.py,AdaptiveRandomForest,predict,#AdaptiveRandomForest#Any#,255

Before Change



        
        r, _ = get_dimensions(X)
        predictions = []
        for i in range(r):
            votes = self.get_votes_for_instance(X[i])
            if votes == {}:
                // Ensemble is empty, all classes equal, default to zero
                predictions.append(0)
            else:
                predictions.append(max(votes, key=votes.get))
        return np.asarray(predictions)

    def predict_proba(self, X):
         Estimates the probability of each sample in X belonging to each of the class-labels.

After Change


        A numpy.ndarray with all the predictions for the samples in X.

        
        y_proba = self.predict_proba(X)
        n_rows = y_proba.shape[0]
        y_pred = np.zeros(n_rows, dtype=int)
        for i in range(n_rows):
            index = np.argmax(y_proba[i])
            y_pred[i] = index
        return y_pred

    def predict_proba(self, X):
         Estimates the probability of each sample in X belonging to each of the class-labels.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: abd0f7b5564e51a412bb7f85e040985d14eb0a4e
Time: 2019-10-06
Author: jacob.montiel@gmail.com
File Name: src/skmultiflow/meta/adaptive_random_forests.py
Class Name: AdaptiveRandomForest
Method Name: predict


Project Name: dnouri/skorch
Commit Name: 892065c8339f9c20d36127645ba3ae169577f47b
Time: 2020-06-27
Author: b.bossan@gmail.com
File Name: skorch/classifier.py
Class Name: NeuralNetClassifier
Method Name: predict


Project Name: dnouri/skorch
Commit Name: 0b290fca12869ef756f4bef7d132fbe73479e2d5
Time: 2018-02-06
Author: benjamin.bossan@ottogroup.com
File Name: skorch/net.py
Class Name: NeuralNet
Method Name: predict