Tinz Twins Profile picture
Dec 27 6 tweets 3 min read Read on X
🤖 Struggling to understand Linear Regression?

Don't worry, you're in the right place!

Let's explore the world of Linear Regression together. 👇🏽  Linear Regression
0️⃣ Linear Regression

Linear Regression is a simple statistical regression method, making it perfect for beginners in predictive analysis.

You can perform Linear Regression with multiple variables or just one.

Let's keep things simple and fun for now! We'll focus on using a single variable today, so it's easier to grasp. 😊

As known as Simple Linear Regression or Univariate Linear Regression.
1️⃣ Linear Regression - Visual Explanation

In simple Linear Regression, we use one independent variable to predict a dependent variable.

🎯 Goal: Find the best-fit line that represents the trend in the data.

For example, you can recognize trends in stocks or house prices.Linear Regression - Visual Explanation
2️⃣ Linear Regression - Mathematical Explanation

The linear relationship between the dependent variable Y (outcome) and the independent variable X (predictor) can be represented by the line function.

To calculate the best-fit line for the data, we use the formula of the line function.Linear Regression - Mathematical Explanation
3️⃣ How can we calculate the Residuals?

The best-fit line has the least error.

🤔 But how can we calculate this error?

The error is the difference between
- the observed values (dependent variable) and
- the predicted values (dependent variable).

We have to minimize this error to get the best-fit line.How can we calculate the Residuals?
4️⃣ How can we calculate the Intercept and the Slope?

We use the least squares method to calculate the intercept and the slope.

The least squares method is referred to in the literature as OLS regression (Ordinary Least Squares).

We get the best-fit line when the sum of the distance squares is minimal.

Here are the estimators for Intercept and Slope 👇🏽How can we calculate the Intercept and the Slope?

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Tinz Twins

Tinz Twins Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @tinztwins

Dec 28
🤖 Have you trouble understanding ensemble methods?

Don't worry, you're in the right place!

Let's explore the world of ensemble methods together. 👇🏽Understanding Ensemble Methods
1️⃣ What are ensemble methods?

Ensemble methods are a powerful approach in the world of machine learning that involve combining multiple models to create an even more robust and accurate model.

💡 The primary idea behind ensemble methods is that the aggregation of multiple models helps to mitigate the weaknesses of the individual models.

This assumption is based on the belief that each model brings its unique strengths to the table, and by combining them, we can create a more comprehensive and reliable model.What are ensemble methods?
2️⃣ Motivation behind it

The motivation behind ensemble methods:

🔹 Reducing the variance: One of the primary goals of ensemble methods is to reduce the variance in the results. By aggregating the predictions of multiple models, the overall output becomes less dependent on the dataset.

🔹 Reducing the bias: Another important motivation for ensemble methods is to reduce the bias in the model. When we combine different models, each with their unique strengths and weaknesses, the resulting ensemble can learn different classes more effectively than individual models.

🎯 Goal: Variance reduction without sacrificing bias!Motivation behind Ensemble Methods
Read 9 tweets
Dec 26
What is the best way to allocate your money across various financial investments? 📈

Don't worry, we've got you covered. 🤓

Discover how to determine the statistically optimal allocation in this post.

A thread 🧵 Return correlation in the portfolio example
1️⃣ Investment returns (R1, R2, ...) are random variables, which means they have an expected value, variance, distribution, and so on. Below, you can see the distribution for the return on a security.

This security has a positive expected return, but a loss cannot be ruled out. The loss probability is represented by the light blue color. We can easily calculate this probability as the area under the density curve.Image
2️⃣ But what does the expected value mean? Let's consider adding a second security. This second security has a higher expected value, which generally indicates a higher return. Two securities: Expected returns
Read 10 tweets
Dec 3
📈 Candlestick Charts - Clearly explained

Candlestick charts are a popular type of financial chart used to represent the price movement of assets such as stocks over time. They offer valuable insights into market trends and investor sentiment. You can use @OpenBB to plot candlestick charts. For us, it is the best tool for investment research.

A thread 🧵
OpenBB Terminal Candlestick Chart
1/5: Each candlestick represents a specific time period (e.g., 1 day, 1 hour, 1 day) and consists of a body and wicks. The body displays the opening and closing prices, while the wicks signify the highest and lowest prices achieved during that period.
2/5: Green (or white) candlesticks signify that the closing price was higher than the opening price, indicating bullish price movement. Red (or black) candlesticks represent bearish price movement, with the closing price lower than the opening price. Image
Read 9 tweets
Jul 12
🤔 Using @LangChainAI to Chat with Earnings Reports of Companies

In our article, we build a plotly dash web app (@plotlygraphs) to compare the Q1 interim reports of Tesla, Mercedes Benz and BMW. 

The steps are as follows:
Document Loading → Document Splitting → Vector… https://t.co/zHaZO8EwYgtwitter.com/i/web/status/1…
0️⃣ Link to our article:
towardsfinance.com/langchain-use-…
1️⃣ Before we start, here's a short demo of the final web app:
Read 11 tweets
Jul 3
🤔 Use the Power of LLMs on your data with @llama_index!

With LlamaIndex, you can connect your custom data sources to LLMs. There are a high-level API and a low-level API for advanced developers. In our article, we focus on the high-level API. We'll show you an example of how to… https://t.co/5OBUMAilfDtwitter.com/i/web/status/1…
0️⃣ Link to our article:

pub.towardsai.net/llamaindex-use…
1️⃣ @llama_index is a very user-friendly data framework. The framework allows you to build powerful end-user applications. You can integrate LlamaIndex easily into your existing tech stack (e.g. LangChain, Flask, Docker, or anything else).
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(