Intermittent Time Series Forecasting in Python

In this post, you will learn how to easily forecast intermittent time series data using the StatsForecast library in Python. Intermittent time series data is unique in the world of forecasting because it often includes missing data, irregular values, or a large number of zeros. Traditional forecasting methods can struggle with these types of data, but after reading this post, you’ll have all the tools you need to tackle even the most complex intermittent time series....

February 14, 2023 · 14 min · Mario Filho

Multiple Time Series Forecasting with Convolutional Neural Networks in Python

In this article you will learn an easy, fast, step-by-step way to use Convolutional Neural Networks for multiple time series forecasting in Python. We will use the NeuralForecast library which implements the Temporal Convolutional Network (TCN) architecture. Table of Contents Temporal Convolutional Network (TCN) How to Install NeuralForecast With and Without GPU Support How To Prepare Time Series Data For The Temporal Convolutional Network Time Series Validation Split Temporal Convolutional Network Hyperparameters kernel_size dilations input_size_multiplier encoder_hidden_size context_size decoder_hidden_size learning_rate max_steps Training a Temporal Convolutional Network In Python Training a Temporal Convolutional Network with External Variables in Python Temporal Convolutional Network (TCN) This architecture is a variant of the Convolutional Neural Network (CNN) architecture that is specially designed for time series forecasting....

February 12, 2023 · 13 min · Mario Filho

Naive Time Series Forecasting in Python

Table of Contents What Is Naive Forecasting? Installing StatsForecast Naive Forecasting Models Simple Naive Forecast Seasonal Naive Forecast Window Average Forecast Seasonal Window Average Forecast Preparing The Data For StatsForecast Time Series Validation Split Note About This Data Building Naive Forecasting Models In Python What Is Naive Forecasting? Whenever you start a time series forecasting project, you should start with a naive model....

February 11, 2023 · 7 min · Mario Filho

Multiple Time Series Forecasting with ARIMA in Python

ARIMA is one of the most popular univariate statistical models used for time series forecasting. Here you will learn how to use the StatsForecast library, which provides a fast, scalable and easy-to-use interface for us to train ARIMA models in Python. To understand ARIMA, let’s take an example of sales forecasting. Suppose a retail store has historical sales data for the past 12 months. To make a sales forecast for the next 3 months, we can fit an ARIMA model to this data....

February 10, 2023 · 6 min · Mario Filho

Multiple Time Series Forecasting With LSTM In Python

Building an LSTM from scratch is very laborious and prone to mistakes, but we have libraries that will help us harness its power without having to spend hours debugging. We will use the NeuralForecast library which, in addition to implementing the most common structures of recurrent neural networks, also implements automatic hyperparameter tuning. Table of Contents How Does an LSTM Work? When to Use an LSTM How to Install NeuralForecast With and Without GPU Support How To Prepare Time Series Data For The LSTM Time Series Validation Split Automatic Time Series Modeling With LSTM NeuralForecast’s LSTM Architecture Automatic Hyperparameter Tuning input_size_multiplier encoder_hidden_size encoder_n_layers decoder_hidden_size learning_rate max_steps Training Code For LSTM In Python Hyperparameter Tuning Report Adding External Variables To The LSTM Custom PyTorch Loss Function (WMAPE) {#wmape-loss} Frequently Asked Questions How To Train The LSTM With Multiple SKUs?...

February 9, 2023 · 15 min · Mario Filho

Multiple Time Series Forecasting With Scikit-learn

Forecasting time series is a very common task in the daily life of a data scientist. It can be predicting future demand for a product, city traffic or even the weather. With accurate time series forecasts, companies can adjust their production strategies, inventory management, resource allocation and other key decisions, leading to significant cost reduction and increased efficiency. Furthermore, forecasts also allow companies to be more proactive rather than reactive, anticipating market trends and adjusting their strategies accordingly....

February 8, 2023 · 15 min · Mario Filho

Does XGBoost Need Feature Scaling Or Normalization?

If you are using XGBoost with decision trees as your base model, you don’t need to worry about scaling or normalizing your features. Decision trees are not sensitive to the scale of the features. In practice, I have seen very minor differences in score by scaling features for decision trees, but these are due to numerical computing implementations and not significant in practice. If you are using XGBoost with linear models as base models, it is a good idea to scale or normalize the features....

December 30, 2022 · 7 min · Mario Filho

Don't Let Multicollinearity Mess Up Your Marketing Mix Model

One thing you should be aware of when using marketing mix models is something called multicollinearity. This happens when two or more input variables in your model are highly correlated, making it tough to interpret the results. I like to play around with online ads, so I decided to give marketing mix models another try to learn more about them. I don’t actually have anything to sell, but I thought it would be a fun exercise to create an Instagram ad campaign to try and get more followers....

December 29, 2022 · 3 min · Mario Filho

Adstock in Marketing Mix Modeling

Table of Contents What Is Adstock in Marketing Mix Modeling? Why Is Adstock Important In Marketing Mix Modeling? How To Calculate Geometric Adstock Model in Python? How To Calculate Weibull Adstock Model in Python? Which Adstock Models Are Available In Robyn? Geometric Adstock Model Weibull Adstock Model Which Adstock Models Are Available In LightweightMMM? Adstock Hill Adstock Carryover How To Choose The Best Adstock Model?...

December 27, 2022 · 10 min · Mario Filho

Generating Text With Contrastive Search vs GPT-3/ChatGPT

I got very excited about a new technique in natural language processing (NLP) called Contrastive Search. It is a powerful tool that improves the quality of text generated by smaller language models. In this blog post, I will compare the outputs of contrastive search in a few open-source models with GPT-3. Finally, I will talk about the implications of this technique and how it could be used in the future. So, let’s get started!...

December 5, 2022 · 13 min · Mario Filho