David Andrรฉs ๐Ÿค–๐Ÿ“ˆ๐Ÿ Profile picture
Jan 6, 2023 โ€ข 10 tweets โ€ข 4 min read โ€ข Read on X
Don't forecast future values in Time Series using the traditional way!! โ›”

Discover the Rolling forecasting! ๐Ÿคฏ

#python #machinelearning #ml #ai #datascience
Yesterday we discussed the first way of forecasting with your Time Series model:
1๏ธโƒฃ The traditional way or multi-step forecast

Today is time for the second (and better) way:

2๏ธโƒฃ Rolling forecast
2๏ธโƒฃ Rolling forecast

As mentioned yesterday, this consists of training the model every day, with all the available data until the present day.

Then we forecast for tomorrow. Image
Let's continue with yesterday's example.

The data we used was the Apple stock price.
We assumed that today was 30/11/2021.

We split the data in two:
- Training: prices until "today"
- Testing: prices from "today"
- Training set to train the model.

- Testing set to evaluate the results, as this is the Actual price to match. Image
This will consider all the available data, which will significantly improve the predictions! ๐Ÿคฏ

NOTE: this data or model are not the best ones, so this model seems to kind of replicate the previous price. This was not the purpose of this thread, so we will not focus on that.
โ–ถ๏ธ TL;DR

The rolling forecasting method is a much better way of evaluating your Time Series model.

The traditional method performs poorly as it does not consider all the available data.
Check yesterday's thread about the Traditional forecasting method ๐Ÿ‘‡
Please ๐Ÿ”Retweet the FIRST tweet if you found it useful!

๐Ÿ”” Follow me @daansan_ml if you are interested in:

๐Ÿ #Python
๐Ÿ“Š #DataScience
๐Ÿ“ˆ #TimeSeries
๐Ÿค– #MachineLearning

Thanks! ๐Ÿ˜‰

โ€ข โ€ข โ€ข

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

Keep Current with David Andrรฉs ๐Ÿค–๐Ÿ“ˆ๐Ÿ

David Andrรฉs ๐Ÿค–๐Ÿ“ˆ๐Ÿ 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 @daansan_ml

Apr 27
I bet you've heard a lot about RAG recently...

๐Ÿ‘‰ But what is it?
๐Ÿ‘‰ And what does it consist of?

Find out more about this here ๐Ÿงต ๐Ÿ‘‡ Image
RAG helps bridge the gap between large language models and external data sources, allowing AI systems to generate relevant and informed responses by leveraging knowledge from existing documents and databases.

It involves a five-step process ๐Ÿ‘‡
1๏ธโƒฃ Data Collection
The first step is gathering all the data needed for the application - user manuals, databases, FAQs, etc. For a customer support chatbot, this could include product documentation, troubleshooting guides, and common inquiries.
Read 8 tweets
Apr 16
Vector databases are pivotal for Large Language Models (LLMs) due to their ability to handle high-dimensional vector data efficiently.

โ–ถ๏ธ They optimize storage, retrieval, and management of vector embeddings crucial for LLM performance.

Learn more ๐Ÿ‘‡ ๐Ÿงต Image
โœฆ They empower similarity searches vital for LLMs in tasks like semantic search and recommendation systems.
By finding the most similar vector embeddings within large datasets, they aid in delivering more accurate results.
โœฆ Vector databases are scalable solutions for LLMs operating on massive datasets.
They're engineered to perform well even as data size scales up, making them indispensable for large-scale ML applications.
Read 8 tweets
Apr 11
Do you want to build a Language Model Application?

Then, you need to try LangChain!

๐Ÿ‘‡ ๐Ÿงต Image
LangChain offers different modules tailored for language model applications.

Whether you're crafting a simple app or a more complex system, these modules got you covered.
The most common chain that LangChain offers consists of three elements:

1๏ธโƒฃ LLM (Large Language Model)
2๏ธโƒฃ Prompt Templates
3๏ธโƒฃ Output Parsers

Let's extend each of them ๐Ÿ‘‡
Read 8 tweets
Apr 10
What is the difference between seasonality and cyclicality in time series forecastingโ“

Discover it below ๐Ÿ‘‡

๐Ÿงต Image
Seasonality and cyclicality are two essential concepts that play a crucial role in understanding patterns within time series data.

Let's start with seasonality! ๐ŸŒž๐Ÿ‚โ„๏ธ
1๏ธโƒฃ Seasonality represents a predictable pattern that repeats within a fixed time frame, often a year. It's influenced by external factors like weather, holidays, or cultural events.

๐Ÿ‘‰ EXAMPLE: Think of the surge in ice cream sales during summertime! ๐Ÿฆ๐ŸŒž
Read 11 tweets
Apr 6
Have you ever wondered how ๐—ฆ๐˜‚๐—ฝ๐—ฝ๐—ผ๐—ฟ๐˜ ๐—ฉ๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ๐˜€ (SVM) can handle non-linear data?

The "๐—ž๐—ฒ๐—ฟ๐—ป๐—ฒ๐—น ๐—ง๐—ฟ๐—ถ๐—ฐ๐—ธ" is a fascinating mathematical technique that allows efficient calculations and delivers powerful results!

Let's learn more about it ๐Ÿงต ๐Ÿ‘‡ Image
In SVM, the kernel trick is a clever way to perform complex calculations in a higher-dimensional feature space without explicitly transforming the original data into that space.

It's like finding a hidden pathway to handle non-linear relationships between data points.
Let's imagine we have a dataset with 2 classes of points that aren't linearly separable in a 2D space.

The kernel trick enables us to find a decision boundary, or hyperplane, that effectively separates these classes.

But without having to transform the data explicitly! ๐Ÿคฏ
Read 6 tweets
Mar 11
In time series analysis, the trend component is key.

It indicates the directional movement of data over time.

Let's learn more about the trend ๐Ÿ‘‡๐Ÿงต Image
The trend component represents the overall direction data moves over an extended period.

It captures systematic patterns like gradual increases, decreases, or stable periods. The trend reflects long-term shifts in the data.
Trends can assume linear forms, featuring consistent rates of change, or exhibit nonlinear complexities, providing deeper data insights.

These are 4 common types:
โ€ข linear
โ€ข quadratic
โ€ข exponential
โ€ข logarithmic

๐Ÿ‘‡๐Ÿ‘‡
Read 10 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!

:(