d54b1ef0718023c0d25c7da3319f0a9a288913ea,tgen/logreg_rank.py,LogisticRegressionRanker,cdf_to_dist,#LogisticRegressionRanker#,169

Before Change


    def cdf_to_dist(self, cdf):
        Convert a CDF to a distribution (keep the list format, just discount lower bounds).
        lo_bound = 0.0
        dist = []
        for cand, hi_bound in cdf:
            dist.append((cand, hi_bound - lo_bound))
            lo_bound = hi_bound
        return dist

    def get_best_child(self, parent, cdf):

After Change


    def cdf_to_dist(self, cdf):
        Convert a CDF to a distribution (keep the list format, just discount lower bounds).
        lo_bound = 0.0
        dist = {}
        for cand, hi_bound in cdf:
            dist[cand] = hi_bound - lo_bound
            lo_bound = hi_bound
        return dist

    def get_best_child(self, parent, cdf):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: UFAL-DSG/tgen
Commit Name: d54b1ef0718023c0d25c7da3319f0a9a288913ea
Time: 2014-03-31
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/logreg_rank.py
Class Name: LogisticRegressionRanker
Method Name: cdf_to_dist


Project Name: D2KLab/entity2rec
Commit Name: b0848e1af4b1cf9c4898d549de19e81b167043b2
Time: 2018-07-17
Author: enricopalumbo0@gmail.com
File Name: entity2rec/evaluator.py
Class Name: Evaluator
Method Name: evaluate


Project Name: miso-belica/sumy
Commit Name: 49ea501ade431b48a323bf527f1ea974870100d4
Time: 2013-02-28
Author: miso.belica@gmail.com
File Name: sumy/algorithms/_edmundson.py
Class Name: EdmundsonMethod
Method Name: location_method