# Cross validation for unbalanced dataset using Orange data mining tool

I am using the Orange data mining tool to build and analyze models (decision tree, ANN, ...) predicting customer churn. As this is an imbalanced class problem (10% churn, 90% not churn), I need to oversample within the cross validation. However, I am not totally able to implement this by myself. Is there anyone with some Orange knowledge that could help me?

Thank you!

## 1 Answer

Orange does not have over/undersampling. Our reasoning is that if you model a problem with 10% positive class, than you should not train the model with 50:50 class distribution - it will not reflect the real life. However, there's an option in Orange in LogReg and Random Forest to balance class distribution, which considers class distribution when building a model.

• Thank you for your answer. I was wondering where I could find this Option in LogReg and Random Forests? Do you have to activate this option or is it build-in? Because I don't see it in the API of Logistic regression or Random Forests? – Emma Bartholomeeusen Dec 15 '20 at 14:20
• It is the class_weight parameter. – vijolica Dec 16 '20 at 8:12
• Thank you. Are you somewhat familiar with Orange? Because I am struggling with a few basic operations on a datatable and looking for someone who could help me get started.. – Emma Bartholomeeusen Dec 16 '20 at 10:29