KDnuggets » Forums
Latest News



 FAQFAQ    SearchSearch    MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

partition data set into training and test datasets

 
Post new topic   Reply to topic    www.kdnuggets.com Forum Index -> Classification & Clustering
View previous topic :: View next topic  
Author Message
dhanya



Joined: 24 Jul 2011
Posts: 1

PostPosted: Sun Jul 24, 2011 8:58 am    Post subject: partition data set into training and test datasets Reply with quote

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
View user's profile Send private message Send e-mail
alextui
Contributor


Joined: 13 Oct 2011
Posts: 8
Location: Philadelphila, PA

PostPosted: Tue Oct 25, 2011 4:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
editor
Site Admin


Joined: 04 Oct 2005
Posts: 120
Location: Boston, MA

PostPosted: Mon Oct 31, 2011 5:27 pm    Post subject: Divide a dataset into train and test using random sampling Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.kdnuggets.com Forum Index -> Classification & Clustering All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KDnuggets » Forums

Copyright © 2012 KDnuggets.   Subscribe to KDnuggets News! Tweet Twitter | facebook Facebook | RSS RSS | About KDnuggets