d54b1ef0718023c0d25c7da3319f0a9a288913ea,tgen/logreg_rank.py,LogisticRegressionRanker,create_training_data,#LogisticRegressionRanker#,123

Before Change


                true_children = set([(c.formeme, c.t_lemma, c > node) for c in node.get_children()])
                for cand in cdfs[node.formeme]:
                    feats = self.features.get_features(cand, node)
                    feats["sel"] = cand in true_children
                    train.append(feats)
        // save to file
        log_info("Writing " + train_arff_fname)
        train_set = DataSet()

After Change


                true_children = [(c.formeme, c.t_lemma, c > node) for c in node.get_children()]
                // generate false candidate instances
                pdist = {}
                if node.formeme in cdfs:
                    true_children_set = set(true_children)
                    pdist = self.cdf_to_dist(cdfs[node.formeme])
                    for cand, prob in pdist.iteritems():
                        if cand in true_children_set:
                            continue
                        feats = self.features.get_features((cand, prob), node)
                        feats["sel"] = 0
                        train.append(feats)
                // generate true instances
                for true_child in true_children:
                    feats = self.features.get_features((true_child, pdist.get(true_child, self.LO_PROB)), node)
                    feats["sel"] = 1
                    train.append(feats)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: create_training_data


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: create_training_data


Project Name: etal/cnvkit
Commit Name: 31978b5eb3ccc4683ca0abb22697ebac80f2cba9
Time: 2015-10-07
Author: eric.talevich@gmail.com
File Name: cnvlib/vary.py
Class Name:
Method Name: _parse_records


Project Name: andresriancho/w3af
Commit Name: c08c98415395b76371581432be55381f0f6e2b40
Time: 2018-01-09
Author: andres.riancho@gmail.com
File Name: w3af/plugins/audit/format_string.py
Class Name: format_string
Method Name: _analyze_result