Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara What is Classification | k-NN Classifier
Classification with Python
course content

Contenuti del Corso

Classification with Python

Classification with Python

1. k-NN Classifier
2. Logistic Regression
3. Decision Tree
4. Random Forest
5. Comparing Models

book
What is Classification

Classification is a supervised learning task. Its goal is to predict the class to which the instance belongs based on a set of parameters (features). You need to give many labeled examples of data (called training set) for the computer to learn before it can predict the class of a new instance.

The difference between classification and regression is that regression predicts a continuous numerical value, for example, a price. It can be any real (only positive for a price) number.

In contrast, classification predicts a categorical value, for example, the type of a sweet. There is a finite set of values, and the model tries to classify each instance into one of these categories.

Based on the formulation of a problem, there are several types of classification:

  • Binary classification: in binary classification, a target is one of two possible outcomes. For example, email: spam/not spam, sweet: cookie/not cookie;

  • Multi-class classification: in multi-class classification, there are three or more possible outcomes for a target. For example, email: spam/important/ad/other, sweet: cookie/marshmallow/candy;

  • Multi-label classification: in multi-label classification, each instance can belong to multiple classes at the same time. For example, a movie can be classified as both action and comedy, or an email can be marked as both important and work-related.

For most ML models, you need to encode the target to a number. For binary classification, outcomes are usually encoded as 0/1 (e.g., 1 – cookie, 0 – not a cookie). For a multi-class classification, outcomes are usually encoded as 0, 1, 2, ... (e.g., 0 – candy, 1 – cookie, 2 – marshmallow).

Many different models perform classification. In this course, we will discuss the following models:

  • k-Nearest Neighbors;
  • Logistic Regression;
  • Decision Tree;
  • Random Forest.

Luckily, they are all implemented in the Scikit-learn library and are easy to use.

Why are there so many models?

question mark

What is the main goal of classification in machine learning?

Select the correct answer

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 1
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt