89cb97fe8802687fb67a3a636f5c50a764b41e34,tgen/rank.py,PerceptronRanker,train,#PerceptronRanker#Any#Any#,197
Before Change
ttree, feats = ttrees[ttree_no], X[ttree_no]
log_debug("------\nDATA %d:" % ttree_no)
log_debug("DA: %s" % unicode(da))
log_debug("SENT: %s" % sentences[ttree_no])
log_debug("TTREE: %s" % unicode(ttree))
log_debug("FEATS:", self._feat_val_str(feats, "\t", nonzero=True))
// initialize weights
After Change
// find the top-scoring generated tree, evaluate F-score against gold t-tree
// (disregarding whether it was selected as the best one)
evaler.append(TreeNode(gold_ttree),
TreeNode(rival_ttrees[scores[1:].index(max(scores[1:]))]))
log_debug("TTREE-NO: %04d, SEL_CAND: %04d, LEN: %02d" % (ttree_no, top_cand_idx, len(cands)))
log_debug("ALL CAND TTREES:")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: UFAL-DSG/tgen
Commit Name: 89cb97fe8802687fb67a3a636f5c50a764b41e34
Time: 2014-08-20
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/rank.py
Class Name: PerceptronRanker
Method Name: train
Project Name: UFAL-DSG/tgen
Commit Name: ef4b6aebffc902a2f4f8b3232fe2ee7e77b6dd9f
Time: 2015-11-13
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/classif.py
Class Name: TreeClassifier
Method Name: _training_pass
Project Name: UFAL-DSG/tgen
Commit Name: 8ea6f4e142a345881dc45df5269261e1737a946a
Time: 2015-11-13
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/classif.py
Class Name: TreeClassifier
Method Name: _training_pass