cbdf7049574e1725f116aafbe7a9cd85c198d268,aletheia/models.py,EnsembleSVM,predict_proba,#EnsembleSVM#Any#,75

Before Change



    def predict_proba(self, X):
        X_val=self.selector.transform(X)
        y_val_pred=[0]*len(X_val)
        for clf in self.clf_list:
            P=clf.predict_proba(X_val)
            for i in range(len(P)):
                y_val_pred[i]+=P[i][0]
        return y_val_pred


    def score(self, X, y):

After Change



    def predict_proba(self, X):
        y_pred=self._predict_cover_proba(X)
        return [ [float(x)/100, 1-float(x)/100] for x in y_pred ]

    def _predict_cover_proba(self, X):
        X_val=self.selector.transform(X)
        y_val_pred=[0]*len(X_val)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: daniellerch/aletheia
Commit Name: cbdf7049574e1725f116aafbe7a9cd85c198d268
Time: 2017-11-08
Author: dlerch@gmail.com
File Name: aletheia/models.py
Class Name: EnsembleSVM
Method Name: predict_proba


Project Name: deepmipt/DeepPavlov
Commit Name: c672738b39c8f739551da0d88991a2fedfba3e14
Time: 2018-10-04
Author: puleon@mail.ru
File Name: deeppavlov/models/ranking/metrics.py
Class Name:
Method Name: rank_response


Project Name: deepmipt/DeepPavlov
Commit Name: c672738b39c8f739551da0d88991a2fedfba3e14
Time: 2018-10-04
Author: puleon@mail.ru
File Name: deeppavlov/models/ranking/metrics.py
Class Name:
Method Name: recall_at_k


Project Name: daniellerch/aletheia
Commit Name: cbdf7049574e1725f116aafbe7a9cd85c198d268
Time: 2017-11-08
Author: dlerch@gmail.com
File Name: aletheia/models.py
Class Name: EnsembleSVM
Method Name: predict_proba