Starting with logistic regression
Before we delve into neural networks and deep learning models, let's take a look at logistic regression, which can be viewed as a single layer neural network. Even the sigmoid function commonly used in logistic regression is used as an activation function in neural networks.
Getting ready
Logistic regression is a supervised machine learning approach for the classification of dichotomous/ordinal (order discrete) categories.
How to do it...
Logistic regression serves as a building block for complex neural network models using sigmoid as an activation function. The logistic function (or sigmoid) can be represented as follows:
The preceding sigmoid function forms a continuous curve with a value bound between [0, 1], as illustrated in the following screenshot:
Sigmoid functional form
The formulation of a logistic regression model can be written as follows:
Here, W is the weight associated with features X= [x1, x2, ..., xm] and b is the model intercept, also known as...