?? pp-discretization.py
字號(hào):
# Description: Shows how to use preprocessors for discretization
# Category: preprocessing, discretization, categorization
# Classes: Preprocessor, Preprocessor_discretize
# Uses: iris
# Referenced: preprocessing.htm
import orange
iris = orange.ExampleTable("iris")
pp = orange.Preprocessor_discretize()
pp.method = orange.EquiDistDiscretization(numberOfIntervals = 5)
data2 = pp(iris)
for ex in data2[:10]:
print ex
pp.attributes = [iris.domain["petal length"], iris.domain["sepal length"]]
data2 = pp(iris)
for ex in data2[:10]:
print ex
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -