source: orange/docs/tutorial/rst/code/sample_adult.py @ 9374:59bac7ddd8a2

Revision 9374:59bac7ddd8a2, 419 bytes checked in by mitar, 2 years ago (diff)

Tutorial documentation structure.

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.