source: orange/Orange/testing/regression/tests_20/reference_randomindicesn.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 462 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

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