source: orange/docs/tutorial/rst/code/sample_adult.py @ 9747:9abf63b01601

Revision 9747:9abf63b01601, 408 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Changed data set path.

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("adult_sample.tab")
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.