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

Defining the forecasting models

As a data science consultant, you've been tasked with predicting US hourly electricity demand. Before diving into training and testing, you first need to define your machine learning models: ElasticNet, KNeighborsRegressor, and MLPRegressor. Then, you'll initialize the MLForecast object with key parameters.

To capture temporal dependencies, you'll regress the time series against the last 24 lags and include seasonal features like the day of the week and hour of the day. This setup will form the foundation for building robust forecasts.

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.

from sklearn.neighbors import KNeighborsRegressor  
from sklearn.neural_network import MLPRegressor
from sklearn.linear_model import ElasticNet  

# Define machine learning models for forecasting
ml_models = {"knn": ____(), "mlp": ____(), "enet": ____()} 
Kodu Düzenle ve Çalıştır