Different Types of Machine Learning: Part 2 – Supervised Learning: Linear Regression, Polynomial Regression, and Logistic Regression

Different Types of Machine Learning: Part 2 – Supervised Learning: Linear Regression, Polynomial Regression, and Logistic Regression

  1. This is the second part of an article about different types of machine learning.
  2. Here, we will describe a few approaches within the Supervised type of ML.
  3. Before we start, it makes sense to mention that Supervised Learning is divided into two types: Classification and Regression.
  4. The goal of Classification is to categorize data into predefined classes, such as "Spam" or "Non-Spam."
  5. The goal of Regression is to predict a continuous outcome based on input features. For example, predicting house prices based on features like location, size, and number of rooms.
  6. Here is a list of the most common approaches used for Classification or Regression.


Simple Linear Regression


  1. The main idea of Linear Regression is to find the best-fit line for the data. The line that is closest to all target values.
  2. How do we determine that the line is the best fit?
  3. There are several ways to determine the best-fit line. For example, we can use the least squares method. This method finds the line that minimizes the sum of the squared differences (errors) between the actual values and the predicted values.
  4. The values on this line will be the predictions of the target parameter (e.g., price).


Multiple Linear Regression

  1. Similar to Simple Linear Regression, but while Simple Regression uses only one independent variable (e.g., predicting price based on location), Multiple Regression uses more than one (e.g., predicting price based on location and size).


Polynomial Regression


  1. In Polynomial Regression, we draw a curve instead of a straight line. This is used when the relationship between the dependent and independent variables is nonlinear.
  2. Example: Predicting the number of cars on the road at different times of the day.


Logistic Regression

  1. Despite its name, logistic regression is actually a classification method, not a regression.
  2. This historical naming convention can be confusing:)
  3. The main idea of Logistic Regression is to calculate the probability of an outcome being in a specific class, assigning it to a class based on a threshold (e.g., less than 0.5 = non-spam, more than 0.5 = spam).
  4. Logistic regression can be divided into several types:
  5. Binary Logistic Regression: Used when the target variable has two classes, such as “spam” or “not spam.”
  6. Multinomial Logistic Regression: An extension for cases where the target variable has more than two classes, using a “one-vs-rest” approach to classify each class separately.
  7. Ordinal Logistic Regression: Used when the target variable has multiple categories with a natural order (e.g., "poor," "average," "excellent").


That's all for today. Next time, we will continue with other supervised learning approaches.

要查看或添加评论,请登录

Aleh Lialik的更多文章

社区洞察

其他会员也浏览了