Today I am starting a new series of threads to simplify ML algorithms.
...and Linear Regression is the first one! ππ»
Linear regression is the simplest statistical regression method used for predictive analysis.
It can be performed with multiple variables.... but today we'll focus on a single one.
Also known as Simple Linear Regression.
1οΈβ£ π¦ππ π£ππ πππ‘πππ₯ π₯πππ₯ππ¦π¦ππ’π‘
In Simple Linear Regression, we use one independent variable to predict a dependent one.
The main goal? π―
Finding a line of best fit.
It's simple yet powerful, revealing hidden trends in data.
2οΈβ£ ππ’πͺ ππ’ππ¦ ππ§ πͺπ’π₯π?
Linear regression takes advantage of a line to calculate the slope (A) and intercept (B).
We need:
- A dependent and an independent variable.
- A linear dependency between them.
3οΈβ£ ππ’πͺ ππ’ πͺπ πππππ‘π π§ππ πππ¦π§ πππ§?
The best-fit line is the line that presents the least error.
Huh? π€
well...
Errors are the difference between:
- Observed values of the dependent variable
- The predicted ones
With this definition, we get the error.
4οΈβ£ ππ’πͺ ππ’ πͺπ π’ππ§πππ‘ ππ§ π ππ§πππ ππ§ππππππ¬?
We use a cost function that helps us work out the optimal values for A and B.
In linear regression, this cost function is Mean Squared Errors (MSE).
It is the average of the squared errors.
β ππ’π‘π¨π¦
To find our optimal solutions, we use the gradient descent.
It is one of the optimization algorithms that optimizes the cost function.
To obtain the optimal solution, we need to reduce MSE for all data points.
Iteratively we get closer to the optimal solution.
6οΈβ£ ππ¦π¦π¨π π£π§ππ’π‘π¦ π§π’ ππ£π£ππ¬ ππ§
Linear Regression isn't just about drawing lines. It assumes certain conditions like linearity, independence, and normal distribution of residuals.
Ensuring these make our model more reliable.
And this is all for now... next week I will exemplify this model with a project, so stay tuned! π€
Linear Regression is more than just a statistical method.
It's the simplest tool that helps us predict and understand our world better.
And that's all for now
If you liked this thread, I am sharing Data Science and AI content.
So don't forget to follow me to get more content like this! (@rfeers)
Linear regression is the simplest statistical regression method used for predictive analysis.
It can be performed with multiple variables.... but today we'll focus on a single one.
Also known as Simple Linear Regression.
1οΈβ£ π¦ππ π£ππ πππ‘πππ₯ π₯πππ₯ππ¦π¦ππ’π‘
In Simple Linear Regression, we use one independent variable to predict a dependent one.
The main goal? π―
Finding a line of best fit.
It's simple yet powerful, revealing hidden trends in data.
The Encoder is the part responsible for processing input tokens through self-attention and feed-forward layers to generate context-aware representations.
π Itβs the powerhouse behind understanding sequences in NLP models.
Logistic Regression clearly explained with visualsππ»
(Don't forget to bookmark for later! π)
1οΈβ£ ππ’πππ¦π§ππ π₯πππ₯ππ¦π¦ππ’π‘
It is a binary classification model used to classify our input data into two main categories.
It can be extended to multiple classifications... but today we'll focus on a binary one.
Also known as Simple Logistic Regression.
2οΈβ£ ππ’πͺ π§π’ ππ’π π£π¨π§π ππ§?
The Sigmoid Function is our mathematical wand, turning numbers into neat probabilities between 0 and 1.
It's what makes Logistic Regression tick, giving us a clear 'probabilistic' picture.
Linear Regression clearly explained with visualsππ»
(Don't forget to bookmar for later! π)
Linear regression is the simplest statistical regression method used for predictive analysis.
It can be performed with multiple variables.... but today we'll focus on a single one.
Also known as Simple Linear Regression.
1οΈβ£ π¦ππ π£ππ πππ‘πππ₯ π₯πππ₯ππ¦π¦ππ’π‘
In Simple Linear Regression, we use one independent variable to predict a dependent one.
The main goal? π―
Finding a line of best fit.
It's simple yet powerful, revealing hidden trends in data.
Today let's exemplify SQL's execution order with a simple queryππ»
(Don't forget to bookmark for later! π)
1οΈβ£ π¦π§ππ₯π§ππ‘π ππ₯π’π π’π¨π₯ π₯ππͺ π§ππππ
We use a dummy table with the salary of employees depending on their field and experience,
π― Our main goal?
Understand the field that earns the most.
Today let's exemplify SQL's execution order with a simple queryππ»
1οΈβ£ π¦π§ππ₯π§ππ‘π ππ₯π’π π’π¨π₯ π₯ππͺ π§ππππ
We use a dummy table with the salary of employees depending on their field and experience,
π― Our main goal?
Understand the field that earns the most.
2οΈβ£ π¦π€π π€π¨ππ₯π¬ π¦π§π₯π¨ππ§π¨π₯π (to use)
We define a query to obtain our goal data.