BaşlayınÜcretsiz Başlayın

Forecasting with ML Models

As a data science consultant, your task is to predict US hourly electricity demand. In the previous task, you cleaned and prepared the data. Now, it's time to use machine learning models to build your forecast.

We previously covered the statsforecast workflow, and now you'll apply the same principles using mlforecast.

The train and test datasets, as well as models (LGBMRegressor(), XGBRegressor(), LinearRegression()), are preloaded.

The MLForecast class has been imported from the mlforecast package, ready to use. Let's build your forecast!

Bu egzersiz

Designing Forecasting Pipelines for Production

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Define the ML models
ml_models = [____(),  XGBRegressor(), LinearRegression()]

# Set up the MLForecast object with models and frequency
mlf = ____(
    models= ____,  
    freq='____', 
    lags=list(range(1, 24)), 
    date_features=['year', 'month', 'day', 'dayofweek', 'quarter', 'week', 'hour'])
Kodu Düzenle ve Çalıştır