source: orange/docs/tutorial/rst/code/py-score-features.py @ 11052:c22077a09e63

Revision 11052:c22077a09e63, 277 bytes checked in by blaz <blaz.zupan@…>, 16 months ago (diff)

new tutorial

Line 
1import Orange
2
3data = Orange.data.Table("promoters")
4gain = Orange.feature.scoring.InfoGain()
5best = [f for _, f in sorted((gain(x, data), x) for x in data.domain.features)[-5:]]
6print "Features:", len(data.domain.features)
7print "Best ones:", ", ".join([x.name for x in best])
Note: See TracBrowser for help on using the repository browser.