randomindicesn.py
来自「orange源码 数据挖掘技术」· Python 代码 · 共 20 行
PY
20 行
# Description: Constructs indices for sampling procedure in which examples are divided in more than two groups
# Category: sampling
# Classes: MakeRandomIndices, MakeRandomIndicesN
# Uses: lenses
# Referenced: RandomIndices.htm
import orange
data = orange.ExampleTable("lenses")
indicesn = orange.MakeRandomIndicesN(p=[0.5, 0.25])
ind = indicesn(data)
print ind
indicesn = orange.MakeRandomIndicesN(p=[12, 6])
ind = indicesn(data)
print ind
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?