Skip to content
프로젝트

Jenniferz28/Time-Series-ARIMA-XGBOOST-RNN

GitHub에서 보기

소개

개별 가구의 전력 사용량 예측을 위한 시계열 예측: ARIMA, xgboost, RNN

기타 프로젝트

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Time Series Prediction for Individual Household Power

Dateset: https://archive.ics.uci.edu/ml/datasets/individual+household+electric+power+consumption

The data was collected with a one-minute sampling rate over a period between Dec 2006 and Nov 2010 (47 months) were measured. Six independent variables (electrical quantities and sub-metering values) a numerical dependent variable Global active power with 2,075,259 observations are available. Our goal is to predict the Global active power into the future.

Here, missing values are dropped for simplicity. Furthermore, we find that not all observations are ordered by the date time. Therefore we analyze the data with explicit time stamp as an index. In the preprocessing step, we perform a bucket-average of the raw data to reduce the noise from the one-minute sampling rate. For simplicity, we only focus on the last 18000 rows of raw dataset (the most recent data in Nov 2010).

A list of python files:

  • Gpower_Arima_Main.py : The executable python program of a univariate ARIMA model.
  • myArima.py : implements a class with some callable methods used for the ARIMA model.
  • Gpower_Xgb_Main.py : The executable python program of a tree based model (xgboost).
  • myXgb.py : implements some functions used for the xgboost model.
  • lstm_Main.py : The executable python program of a LSTM model.
  • lstm.py : implements a class of a time series model using an LSTMCell. The credit should go to https://github.com/hzy46/TensorFlow-Time-Series-Examples/blob/master/train_lstm.py
  • util.py : implements various functions for data preprocessing.
  • Exploratory_analysis.py : exploratory analysis and plots of data.
+ Environment : Python 3.6, TensorFlow1.4.

Here, I used 3 different approaches to model the pattern of power consumption.

  • Univariate time series ARIMA.(30-min average was applied on the data to reduce noise.) onestep dynamic forecast
  • Regression tree-based xgboost.(5-min average was performed.) xgbManual
  • Recurrent neural network univariate LSTM (long short-term memoery) model. (15-min average was performed to reduce the noise.) predict_result

Possible approaches to do in the future work:

(i) Dynamic Regression Time Series Model

Given the strong correlations between Sub metering 1, Sub metering 2 and Sub metering 3 and our target variable, these variables could be included into the dynamic regression model or regression time series model.

(ii) Dynamic Xgboost Model

Include the timestep-shifted Global active power columns as features. The target variable will be current Global active power. Recent history of Global active power up to this time stamp (say, from 100 timesteps before) should be included as extra features.

(iii) Multivariate LSTM

Include the features per timestamp Sub metering 1, Sub metering 2 and Sub metering 3, date, time and our target variable into the RNNCell for the multivariate time-series LSTM model. multivariate

관련 프로젝트 살펴보기

불러오는 중…