source: orange/docs/reference/rst/code/randomindicesn.py @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 482 bytes checked in by lanumek, 2 years ago (diff)

Changed names of data sets (table replaced with data or name of the data set).

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
9lenses = Orange.data.Table("lenses")
10
11indicesn = Orange.data.sample.SubsetIndicesN(p=[0.5, 0.25])
12
13ind = indicesn(lenses)
14print ind
15
16indicesn = Orange.data.sample.SubsetIndicesN(p=[12, 6])
17
18ind = indicesn(lenses)
19print ind
Note: See TracBrowser for help on using the repository browser.