source: orange/docs/reference/rst/code/unusedValues.py @ 9754:060889552ecf

Revision 9754:060889552ecf, 462 bytes checked in by gregorr, 2 years ago (diff)

Added new documentation: Orange.classification.random and Orange.preprocess.RemoveUnusedValues.

Line 
1import Orange
2data = Orange.data.Table("unusedValues")
3
4new_variables = [Orange.core.RemoveUnusedValues(var, data) for variable in data.domain.variables]
5
6print
7for variable in range(len(data.domain)):
8    print data.domain[variable],
9    if new_variables[variable] == data.domain[variable]:
10        print "retained as is"
11    elif new_variables[variable]:
12        print "reduced, new values are", new_variables[variable].values
13    else:
14        print "removed"
Note: See TracBrowser for help on using the repository browser.