Re: using resample filter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: using resample filter

Eibe Frank-3
Consider using the SpreadSubsample filter. It can be used to undersample all classes other than the smallest class in the data. The distributionSpread parameter determines how much data is sampled from each of the other classes.

If the smallest class has M instances, then at most distributionSpread * M instances will be picked from each of the other classes. Thus, if you set distributionSpread to 1, each of the classes will have the same size in the resulting dataset.

The filter performs sampling without replacement.

If you are working with a learning algorithm that implements the WeightedInstancesHandler interface, consider using ClassBalancer as an alternative filter. It doesn't do any sampling at all and just reweights the instances so that each class has the total weight.

Eibe

---------- Forwarded message ----------
From: my weka account <[hidden email]>
To: [hidden email]
Cc: 
Bcc: 
Date: Mon, 19 Feb 2018 01:37:31 -0700 (MST)
Subject: using resample filter
hello every one !
my data set contain three imbalanced classes, i've tried to use
filter.supervised.resample to sampling the the majority class , but when i
did this the number of all classes(majority and minority) reduced ,
now i want to know if is there any way to implement undersampling only on
majority class?in wek




--
Sent from: http://weka.8497.n7.nabble.com/



_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html