source: orange/Orange/doc/reference/pp-discretization.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 568 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1# Description: Shows how to use preprocessors for discretization
2# Category:    preprocessing, discretization, categorization
3# Classes:     Preprocessor, Preprocessor_discretize
4# Uses:        iris
5# Referenced:  preprocessing.htm
6
7import orange
8iris = orange.ExampleTable("iris")
9
10pp = orange.Preprocessor_discretize()
11pp.method = orange.EquiDistDiscretization(numberOfIntervals = 5)
12data2 = pp(iris)
13
14for ex in data2[:10]:
15    print ex
16
17pp.attributes = [iris.domain["petal length"], iris.domain["sepal length"]]
18data2 = pp(iris)
19
20for ex in data2[:10]:
21    print ex
Note: See TracBrowser for help on using the repository browser.