Logistic regression

Logistic regression is a classification algorithm that is best suited to when the output to be predicted is a binary type—true or false, male or female, win or loss, and so on. Binary type means only two outcomes are possible.

The logistic regression is so called because of the sigmoid function used by the algorithm.

A logistic function or logistic curve is a common S shape (sigmoid curve), depicted by the following equation:

In the preceding equation, the symbols have the following meanings:

  • e: The natural logarithm base (also known as Euler's number)
  • x0: The x-value of the sigmoid's midpoint
  • L: The curve's maximum value
  • k: The steepness of the curve

The standard logistic function is called a sigmoid function:

The sigmoid curve is depicted here. It's an S-shaped curve:

This curve has a finite limit of the following:

  • 0 as x approaches −∞
  • 1 as x approaches +∞

The output of the sigmoid function when x=0 is 0.5.

Thus, if the output is more than 0.5, we can classify the outcome as 1 (or YES), and, if it is less than 0.5, we can classify it as 0 (or NO). For example: if the output is 0.65, in probability terms, it can be interpreted as—There is a 65 percent chance that it is going to rain today.

Thus, the output of the sigmoid function cannot just be used to classify yes/no; it can also be used to determine the probability of yes/no. It can be applied to the following areas:

  • Image segmentation and categorization
  • Geographic image processing
  • Handwriting recognition
  • Healthcare, for disease prediction and gene analytics
  • Prediction in various areas where a binary outcome is expected
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset