According to Wikipedia [1], “*In artificial neural network, activation function of a node defines the output of that node given an input or set of inputs*”. In a neural network there are three types of layers namely,

**Input layer**: This layer accepts and passes the inputs to the hidden layer.

**Hidden layer**: This layer/layers performs numerical computations on the inputs and passes it to the output layer.

**Output layer**: This layer gives the output of the neural network.

Activation functions are applied in the hidden and output layers. Neurons compute the weighted sum along with bias, activation function inputs this…

According to official documentation of scikit-learn ,

*“scikit- learn is an open source machine learning library that supports supervised and unsupervised learning. It also provides various tools for model fitting, data preprocessing, model selection and evaluation, and many other utilities.”*

Lets explore regression with scikit-learn,

For linear regression, we use the Salary dataset from Kaggle. This is a very simple dataset consisting of 2 columns namely YearsExperience and Salary. With linear regression, given a particular value for YearsExperience, we try to predict what could be the salary. We use scikit-learn, and import the below libraries.

# import the necessary libraries …

In the previous blog, I discussed regression and types of regression (https://tinyurl.com/simpleregression). The aim in regression is to find the best fit line to the training data by identifying the best model parameters . But how do we find best model parameters? Using optimization algorithms. Gradient descent, AdaGrad, Adam optimizer, etc. are a few optimization algorithms. Let’s understand what is gradient descent algorithm and how it works?

Gradient descent is a generic optimization algorithm which is iterative in nature. It means it performs ‘** N’ **iterations to identify the best model parameters. Recall the hypothesis and cost function of linear regression.

Predictive analytics deals with the analysis of the historical and current data to predict the future or unknown. Some of the instances of predictive analytics are prediction of if a customer might might end their relationship with a company: Customer churn prediction, prediction of demand of a product using information like prior history of the product which includes information like number of products sold, regions of demand, seasonality, competitors’ new products in the market, etc. — Sales forecasting. Regression is one of the techniques used in predictive analytics.

Regression is a statistical technique and a supervised algorithm which models the…

I am a data scientist. I write blogs related to machine learning.