source: orange/Orange/doc/ofb/sample_adult.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 416 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

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.