## Machine Learning: Linear Regression in Python (Code Example)

1. Introduction of Cost Function in Machine Learning Linear regression in machine learning via gradient descent can be used to estimate slope (b1) and intercept (b0) for a linear regression model. The criteria for selecting the right b0 and b1 is to minimize the difference between the estimated y and the observed y. We can … Read more

## What is Gradient Descent in Machine Learning? Definition and Python Example

What is Gradient Descent? Gradient Descent (GD) is an optimization algorithm using gradient to help find a local minimum of a function. (For more details on gradients, please refer to my other tutorial.) When the function is convex, a local minimum is also the global minimum. Steps of Gradient Descent Algorithm Step 1: Calculate the gradient function. In … Read more

## What is Gradient in Machine Learning? Definition and Examples

Gradient for 2-dimension (x-y) In simpler terms, a gradient is a slope. You can calculate a function’s first-order derivative to get its gradient. This tutorial explains gradients with an example and plots. For instance, the following is a function of x, and the function can be plotted on a two-dimension x-y space. If you calculate its first-order … Read more