source: orange/orange/doc/ofb/sample_adult.py @ 6538:a5f65d7f0b2c

Revision 6538:a5f65d7f0b2c, 416 bytes checked in by Mitar <Mitar@…>, 4 years ago (diff)

Made XPM version of the icon 32x32.

Line 
1# Description: Read 'adult' data set and select 3% of instances (use stratified sampling)
2# Category:    preprocessing
3# Uses:        adult.tab
4# Classes:     ExampleTable, MakeRandomIndices2
5# Referenced:  basic_exploration.htm
6
7import orange
8data = orange.ExampleTable("../datasets/adult_sample")
9selection = orange.MakeRandomIndices2(data, 0.03)
10sample = data.select(selection, 0)
11sample.save("adult_sample.tab")
Note: See TracBrowser for help on using the repository browser.