⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pp-discretization.py

📁 orange源码 数据挖掘技术
💻 PY
字号:
# 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -