Imbalanced class

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Imbalanced class

alkunany
Hi
I have dataset with in 229 instances and 20 attributes the class has 4 values (Normal, early, definite, severe) . the distribution of instances are (Normal: 116 instance, early: 93 instance , definite: 13 instance , severe: 4 instance) , my question is do I need to re sample the dataset or its normal ?

Thanks in Advance .
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Imbalanced class

Eibe Frank-2
Administrator
What does the confusion matrix look like when you run RandomForest?

Also, your classes are ordered, so you could try wrapping RandomForest into OrdinalClassClassifier. That may help.

Cheers,
Eibe

> On 15 May 2017, at 17:57, alkunany <[hidden email]> wrote:
>
> Hi
> I have dataset with in 229 instances and 20 attributes the class has 4
> values (Normal, early, definite, severe) . the distribution of instances are
> (Normal: 116 instance, early: 93 instance , definite: 13 instance , severe:
> 4 instance) , my question is do I need to re sample the dataset or its
> normal ?
>
> Thanks in Advance .
>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Imbalanced-class-tp40612.html
> Sent from the WEKA mailing list archive at 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

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Imbalanced class

alkunany
Dear Eibe
please here is the confusion matrix look for both J48 and OrdinalClassClassifier , so dose it seems fine ?
thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Imbalanced class

Eibe Frank-2
Administrator
Looks like J48 is doing really well: it classifies all instances of the smallest class correctly, and most of the others as well. Perhaps you should also try RandomForest without OrdinalClassClassifier.

Whether the result is good enough really depends on your application. Is this a medical classification problem? In that case, you probably want to introduce different misclassification costs to penalise some errors more than others. For example, classifying an “early” case as “normal” is probably much worse than classifying a “normal” case as “early”.

You can use misclassification costs by applying the CostSensitiveClassifier (perhaps configuring it to minimise expected cost rather than using it in default mode). You will need to specify an appropriate cost matrix when you apply it.

RandomForest applies WEKA’s Bagging with default parameters to build a random forest with RandomTree. Perhaps your smallest class is too small to be processed effectively by Bagging. You could also try building a random forest without bagging (i.e., subsampling) by using RandomCommittee with RandomTree as the base learner.

Cheers,
Eibe

> On 15/05/2017, at 10:21 PM, alkunany <[hidden email]> wrote:
>
> Dear Eibe
> please here is the confusion matrix look for both J48 and
> OrdinalClassClassifier , so dose it seems fine ?
> thanks  <http://weka.8497.n7.nabble.com/file/n40616/using_J48.png>
> <http://weka.8497.n7.nabble.com/file/n40616/using_ordinal.png>
>
>
>
> --
> View this message in context: http://weka.8497.n7.nabble.com/Imbalanced-class-tp40612p40616.html
> Sent from the WEKA mailing list archive at 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

_______________________________________________
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
Loading...