| View previous topic :: View next topic |
| Author |
Message |
dhanya
Joined: 24 Jul 2011 Posts: 1
|
Posted: Sun Jul 24, 2011 8:58 am Post subject: partition data set into training and test datasets |
|
|
I have to divide a dataset into training(80%) and test datasets (20%)using random sampling. I have to do in c#.
Please help me how to do it....I have no idea... |
|
| Back to top |
|
 |
alextui Contributor
Joined: 13 Oct 2011 Posts: 8 Location: Philadelphila, PA
|
Posted: Tue Oct 25, 2011 4:29 pm Post subject: |
|
|
the job can NOT be easily done in C#, unless you had a very good framework.
You can try MATLAB or SAS |
|
| Back to top |
|
 |
editor Site Admin
Joined: 04 Oct 2005 Posts: 120 Location: Boston, MA
|
Posted: Mon Oct 31, 2011 5:27 pm Post subject: Divide a dataset into train and test using random sampling |
|
|
You need to create an additional variable/column in your data, let's call it rnd which will have random values from 0 to 1.
To select 20% test data you assign to test data records where rnd<=0.2 |
|
| Back to top |
|
 |
|