...

/

Setup & the metric problem

Setup & the metric problem

Choosing a proper evaluation metric to evaluate your model's performance can be a real struggle if you have an imbalanced dataset and your project concerns a classification task. Why is it a problem? And how to evaluate your model? We will see all that in this lesson. We will also learn about a new library that gives us access to many robust solutions to handle imbalanced datasets, how to install it, and finally introduce a few methods to help you check your dataset and see whether it is an imbalanced dataset or not in order to fix it.

One more library

To handle imbalanced datasets, we need to use a new rich library called imbalanced-learn alongside the core Python libraries like NumPy, Pandas, and scikit-learn. The imbalanced-learn library is a part of scikit-learn-contrib projects. It gives us access to many advanced methods like SMOTE and Tomek Links.

You can install this library in your environment using these commands:

# using pip
pip install -U imbalanced-learn
#
...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy