Splitting dataset in weka

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Splitting dataset in weka

Sehrish agha
Hello
I have 2 classes in my dataset, each class has 50,000 instances. I want to split my data ,my requirements are
-70% for train set and 30% for test set
-But i want to keep 50% instances of one class and 50% instances of another class in both test and train set. How can i get such split in weka.

_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Splitting dataset in weka

Eibe Frank-2
Administrator
If you want to explicitly create those subset of data on disk, I think the only way to do something like this without programming is to use StratifiedRemoveFolds as the WEKA filter. You could specify 3 folds to get a 1/3, 1/3, 1/3 split. It doesn’t quite give you 70% though.

Note that the random split mode of the Experimenter performs stratification (unlike the percentage split option in the Explorer or the corresponding mode at the command-line). So, if you just want to get performance statistics, this is a good option.

Cheers,
Eibe

> On 5/11/2019, at 7:19 AM, sehrish Agha <[hidden email]> wrote:
>
> Hello
> I have 2 classes in my dataset, each class has 50,000 instances. I want to split my data ,my requirements are
> -70% for train set and 30% for test set
> -But i want to keep 50% instances of one class and 50% instances of another class in both test and train set. How can i get such split in weka.
> _______________________________________________
> Wekalist mailing list -- [hidden email]
> Send posts to: To unsubscribe send an email to [hidden email]
> To subscribe, unsubscribe, etc., visit
> https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html