source: orange/Orange/testing/regression/tests_20/reference_pp-discretization.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 568 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

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.