source: orange/docs/reference/rst/code/randomindicesn.py @ 9372:aef193695ea9

Revision 9372:aef193695ea9, 476 bytes checked in by mitar, 2 years ago (diff)

Moved documentation to the separate directory.

Line 
1# Description: Constructs indices for sampling procedure in which examples are divided in more than two groups
2# Category:    sampling
3# Classes:     MakeRandomIndices, MakeRandomIndicesN
4# Uses:        lenses
5# Referenced:  RandomIndices.htm
6
7import Orange
8
9data = Orange.data.Table("lenses")
10
11indicesn = Orange.data.sample.SubsetIndicesN(p=[0.5, 0.25])
12
13ind = indicesn(data)
14print ind
15
16indicesn = Orange.data.sample.SubsetIndicesN(p=[12, 6])
17
18ind = indicesn(data)
19print ind
Note: See TracBrowser for help on using the repository browser.