Multiple linear regression with gradient descent from scratch in Python

In this post I will show you how to calculate the optimal values of a multiple linear regression using the gradient descent algorithm. In the previous posts I already introduced you to the simple linear regression (of one independent variable) and also to the (stochastic) gradient descent algorithm. First, I will briefly introduce what multiple … Read more

Gradient descent and stochastic gradient descent

In this post I would like to introduce the Gradient Descent and its applications. I hope that every reader of this blog is familiar with derivatives and gradients of (simple in school learned) functions, such as f(x)=7x²+3x+9. If you derive the mentioned function, you get the derivative f'(x)=14x+3. However, if you have functions that depend on … Read more

Simple linear regression

In this post, I write about a simple method of creating a simple linear regression using two formulas. “Simple Linear Regression” is a linear regression model with a singl explanatory variable. A linear regression trys to fit the data with a linear line, hence linear regression. A linear model follows the following equation: Where: m: … Read more

Newton’s method

In this post I will shortly explain what Newton’s method is and how it works. What is it: Newton’s method is an algorithm to find zeropoints of a function Because you cannot always calculate the exact zeropoint we can use this algorithm to approximate the zeros of the function How does it work: Start at … Read more

Covariance and correlation

Right away the most important thought in this post: Covariance by itself only gives the direction of correlatedness Without knowing the scales of your variables, you can’t tell which variables are more correlated Imagine we have a sample X filled with weight values of people.In addition we also have another sample Y with height values … Read more

Variance and standard deviation

In this post I will explain how to calculate the variance and standard deviation, what they are, explain two common question which are mostly not clarified in school books/by teachers and also give away a Python code to calculate both. To quantify the variation of values to a mean, one can use the so-called “variance” … Read more

Cookie Consent with Real Cookie Banner