Skip to Content
Practical Data Science with Python
book

Practical Data Science with Python

by Nathan George
September 2021
Beginner to intermediate
620 pages
15h 30m
English
Packt Publishing
Content preview from Practical Data Science with Python

12

Evaluating Machine Learning Classification Models and Sampling for Classification

Once we have some classification models trained to predict our target variable, we need a way to compare them and choose the best one. One way to compare models is to use metrics such as accuracy and others. In classification, we can often find that our classes or targets are imbalanced. We can improve the performance of ML classification algorithms by means of sampling techniques, such as oversampling and undersampling. In this chapter, we will learn about ways to evaluate our classification models and sampling methods:

  • How to evaluate the performance of our algorithms (performance metrics)
  • Sampling imbalanced data for classification

Let's start with metrics ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Science Projects with Python - Second Edition

Data Science Projects with Python - Second Edition

Stephen Klosterman
Python: End-to-end Data Analysis

Python: End-to-end Data Analysis

Phuong Vothihong, Martin Czygan, Ivan Idris, Magnus Vilhelm Persson, Luiz Felipe Martins

Publisher Resources

ISBN: 9781801071970Supplemental Content