From the course: Machine Learning with Scikit-Learn

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Logistic regression for multiclass classification

Logistic regression for multiclass classification - scikit-learn Tutorial

From the course: Machine Learning with Scikit-Learn

Start my 1-month free trial

Logistic regression for multiclass classification

- [Instructor] A lot of classification models like logistic regression were originally designed for binary classification. That's predicting whether something's one thing or another. For datasets with more than two classes, what do you do? For multi-class classification problems, one approach is to split the task into multiple binary classification datasets, and fit a binary classification model on each. In this video, we'll explore the one-vs-rest strategy and how you can apply it to logistic regression using scikit-learn. One-vs-rest, which is also sometimes called one-vs-all is a technique that extends binary classifiers to multi-class problems. Here's how it works. You train one classifier per class where one class is treated as the positive class. And the other classes are considered negative classes. For example, say you have an image recognition task. Your dataset has four classes the digits zero, one, two, and…

Contents