25723006dbd088a24215b23242e55d06e12afd8e,src/skmultiflow/meta/additive_expert_ensemble.py,AdditiveExpertEnsemble,predict,#AdditiveExpertEnsemble#Any#,66

Before Change


        self.n_samples += X.shape[0]

    def predict(self, X):
        return np.array([np.argmax(self.predict_proba(X))])

    def predict_proba(self, X):
        return self._aggregate_expert_predictions(

After Change


        numpy.ndarray
            A numpy.ndarray with the label prediction for all the samples in X.
        
        preds = np.array([np.array(exp.estimator.predict(X)) * exp.weight
                          for exp in self.experts])
        sum_weights = sum(exp.weight for exp in self.experts)
        aggregate = np.sum(preds / sum_weights, axis=0)
        return (aggregate + 0.5).astype(int)    // Round to nearest int

    def predict_proba(self, X):
        raise NotImplementedError
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 25723006dbd088a24215b23242e55d06e12afd8e
Time: 2019-04-14
Author: andrecruz97@gmail.com
File Name: src/skmultiflow/meta/additive_expert_ensemble.py
Class Name: AdditiveExpertEnsemble
Method Name: predict


Project Name: fgnt/pb_bss
Commit Name: b27721ab556fabb2a7e7fcb223ec1f9f6eb4418d
Time: 2015-10-07
Author: cbj@mail.uni-paderborn.de
File Name: nt/speech_enhancement/beamformer.py
Class Name:
Method Name: get_pca_vector


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 7e0e9b744c1c307d3e42f8feae764ee090fad1ce
Time: 2019-04-08
Author: andrecruz97@gmail.com
File Name: src/skmultiflow/meta/dynamic_weighted_majority.py
Class Name: DynamicWeightedMajority
Method Name: predict