{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd \n", "from datetime import datetime \n", "from datetime import date\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "import numpy as np\n", "import pandas as pd\n", "from keras.models import Sequential\n", "from keras.layers import LSTM, Dense\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.preprocessing import MinMaxScaler,StandardScaler\n", "from keras.callbacks import ModelCheckpoint\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | date | \n", "zone_047_hw_valve | \n", "rtu_004_sat_sp_tn | \n", "zone_047_temp | \n", "zone_047_fan_spd | \n", "rtu_004_fltrd_sa_flow_tn | \n", "rtu_004_sa_temp | \n", "rtu_004_pa_static_stpt_tn | \n", "rtu_004_oa_flow_tn | \n", "rtu_004_oadmpr_pct | \n", "... | \n", "zone_047_heating_sp | \n", "Unnamed: 47_y | \n", "hvac_S | \n", "hp_hws_temp | \n", "aru_001_cwr_temp | \n", "aru_001_cws_fr_gpm | \n", "aru_001_cws_temp | \n", "aru_001_hwr_temp | \n", "aru_001_hws_fr_gpm | \n", "aru_001_hws_temp | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "2018-01-01 00:00:00 | \n", "100.0 | \n", "69.0 | \n", "67.5 | \n", "20.0 | \n", "9265.604 | \n", "66.1 | \n", "0.06 | \n", "0.000000 | \n", "28.0 | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "75.3 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1 | \n", "2018-01-01 00:01:00 | \n", "100.0 | \n", "69.0 | \n", "67.5 | \n", "20.0 | \n", "9265.604 | \n", "66.0 | \n", "0.06 | \n", "6572.099162 | \n", "28.0 | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "75.3 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
2 | \n", "2018-01-01 00:02:00 | \n", "100.0 | \n", "69.0 | \n", "67.5 | \n", "20.0 | \n", "9708.240 | \n", "66.1 | \n", "0.06 | \n", "7628.832542 | \n", "28.0 | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "75.3 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
3 | \n", "2018-01-01 00:03:00 | \n", "100.0 | \n", "69.0 | \n", "67.5 | \n", "20.0 | \n", "9611.638 | \n", "66.1 | \n", "0.06 | \n", "7710.294617 | \n", "28.0 | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "75.3 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
4 | \n", "2018-01-01 00:04:00 | \n", "100.0 | \n", "69.0 | \n", "67.5 | \n", "20.0 | \n", "9215.110 | \n", "66.0 | \n", "0.06 | \n", "7139.184090 | \n", "28.0 | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "75.3 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
2072149 | \n", "2020-12-31 23:58:00 | \n", "100.0 | \n", "68.0 | \n", "63.2 | \n", "20.0 | \n", "18884.834 | \n", "64.4 | \n", "0.06 | \n", "2938.320000 | \n", "23.4 | \n", "... | \n", "71.0 | \n", "69.0 | \n", "23.145000 | \n", "123.8 | \n", "56.25 | \n", "54.71 | \n", "56.4 | \n", "123.42 | \n", "61.6 | \n", "122.36 | \n", "
2072150 | \n", "2020-12-31 23:58:00 | \n", "100.0 | \n", "68.0 | \n", "63.2 | \n", "20.0 | \n", "18884.834 | \n", "64.4 | \n", "0.06 | \n", "2938.320000 | \n", "23.4 | \n", "... | \n", "71.0 | \n", "69.0 | \n", "23.145000 | \n", "123.8 | \n", "56.25 | \n", "54.71 | \n", "56.4 | \n", "123.42 | \n", "61.6 | \n", "122.36 | \n", "
2072151 | \n", "2020-12-31 23:59:00 | \n", "100.0 | \n", "68.0 | \n", "63.2 | \n", "20.0 | \n", "19345.508 | \n", "64.3 | \n", "0.06 | \n", "3154.390000 | \n", "23.4 | \n", "... | \n", "71.0 | \n", "69.0 | \n", "23.145000 | \n", "123.8 | \n", "56.25 | \n", "54.71 | \n", "56.4 | \n", "123.42 | \n", "61.6 | \n", "122.36 | \n", "
2072152 | \n", "2020-12-31 23:59:00 | \n", "100.0 | \n", "68.0 | \n", "63.2 | \n", "20.0 | \n", "19345.508 | \n", "64.3 | \n", "0.06 | \n", "3154.390000 | \n", "23.4 | \n", "... | \n", "71.0 | \n", "69.0 | \n", "23.145000 | \n", "123.8 | \n", "56.25 | \n", "54.71 | \n", "56.4 | \n", "123.42 | \n", "61.6 | \n", "122.36 | \n", "
2072153 | \n", "2021-01-01 00:00:00 | \n", "100.0 | \n", "68.0 | \n", "63.2 | \n", "20.0 | \n", "18650.232 | \n", "64.1 | \n", "0.06 | \n", "3076.270000 | \n", "22.9 | \n", "... | \n", "71.0 | \n", "69.0 | \n", "23.788947 | \n", "123.8 | \n", "56.25 | \n", "54.71 | \n", "56.4 | \n", "123.42 | \n", "61.6 | \n", "122.36 | \n", "
2072154 rows × 30 columns
\n", "\n", " | date | \n", "air_temp_set_1 | \n", "air_temp_set_2 | \n", "dew_point_temperature_set_1d | \n", "relative_humidity_set_1 | \n", "solar_radiation_set_1 | \n", "wifi_third_south | \n", "wifi_fourth_south | \n", "hvac_N | \n", "hvac_S | \n", "
---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "2018-01-01 00:00:00 | \n", "11.64 | \n", "11.51 | \n", "8.1 | \n", "79.07 | \n", "86.7 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1 | \n", "2018-01-01 00:01:00 | \n", "11.64 | \n", "11.51 | \n", "8.1 | \n", "79.07 | \n", "86.7 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
\n", " | date | \n", "hp_hws_temp | \n", "rtu_001_sat_sp_tn | \n", "rtu_002_sat_sp_tn | \n", "rtu_003_sat_sp_tn | \n", "rtu_004_sat_sp_tn | \n", "rtu_001_fltrd_sa_flow_tn | \n", "rtu_002_fltrd_sa_flow_tn | \n", "rtu_003_fltrd_sa_flow_tn | \n", "rtu_004_fltrd_sa_flow_tn | \n", "... | \n", "rtu_002_fltrd_lvl2_plenum_press_tn | \n", "rtu_003_fltrd_lvl2_plenum_press_tn | \n", "rtu_004_fltrd_lvl2_plenum_press_tn | \n", "wifi_third_south | \n", "wifi_fourth_south | \n", "air_temp_set_1 | \n", "air_temp_set_2 | \n", "dew_point_temperature_set_1d | \n", "relative_humidity_set_1 | \n", "solar_radiation_set_1 | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "2018-01-01 00:00:00 | \n", "75.3 | \n", "68.0 | \n", "70.0 | \n", "65.0 | \n", "69.0 | \n", "14131.449 | \n", "13998.757 | \n", "13558.539 | \n", "9265.604 | \n", "... | \n", "0.05 | \n", "0.05 | \n", "0.050 | \n", "NaN | \n", "NaN | \n", "11.64 | \n", "11.51 | \n", "8.1 | \n", "79.07 | \n", "86.7 | \n", "
1 | \n", "2018-01-01 00:01:00 | \n", "75.3 | \n", "68.0 | \n", "70.0 | \n", "65.0 | \n", "69.0 | \n", "14164.429 | \n", "14065.259 | \n", "13592.909 | \n", "9265.604 | \n", "... | \n", "0.05 | \n", "0.04 | \n", "0.046 | \n", "NaN | \n", "NaN | \n", "11.64 | \n", "11.51 | \n", "8.1 | \n", "79.07 | \n", "86.7 | \n", "
2 rows × 65 columns
\n", "\n", " | date | \n", "hp_hws_temp | \n", "rtu_001_sa_temp | \n", "rtu_001_oadmpr_pct | \n", "rtu_001_ra_temp | \n", "rtu_001_oa_temp | \n", "rtu_001_ma_temp | \n", "rtu_001_sf_vfd_spd_fbk_tn | \n", "rtu_001_rf_vfd_spd_fbk_tn | \n", "rtu_002_sa_temp | \n", "... | \n", "rtu_002_ma_temp | \n", "rtu_002_sf_vfd_spd_fbk_tn | \n", "rtu_002_rf_vfd_spd_fbk_tn | \n", "rtu_001_sat_sp_tn | \n", "rtu_002_sat_sp_tn | \n", "air_temp_set_1 | \n", "air_temp_set_2 | \n", "dew_point_temperature_set_1d | \n", "relative_humidity_set_1 | \n", "solar_radiation_set_1 | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
155849 | \n", "2018-05-02 00:00:00 | \n", "91.5 | \n", "68.5 | \n", "46.8 | \n", "73.4 | \n", "63.2 | \n", "64.8 | \n", "75.5 | \n", "63.0 | \n", "68.2 | \n", "... | \n", "69.2 | \n", "76.4 | \n", "60.3 | \n", "68.0 | \n", "68.0 | \n", "14.9 | \n", "14.44 | \n", "7.02 | \n", "59.50 | \n", "335.9 | \n", "
155850 | \n", "2018-05-02 00:01:00 | \n", "91.4 | \n", "68.7 | \n", "46.8 | \n", "73.4 | \n", "63.4 | \n", "64.9 | \n", "79.2 | \n", "61.7 | \n", "69.5 | \n", "... | \n", "68.9 | \n", "79.0 | \n", "59.1 | \n", "68.0 | \n", "68.0 | \n", "14.9 | \n", "14.44 | \n", "7.02 | \n", "59.50 | \n", "335.9 | \n", "
155851 | \n", "2018-05-02 00:02:00 | \n", "91.3 | \n", "68.5 | \n", "46.8 | \n", "73.3 | \n", "63.1 | \n", "64.7 | \n", "75.7 | \n", "58.1 | \n", "67.9 | \n", "... | \n", "64.6 | \n", "76.3 | \n", "55.3 | \n", "68.0 | \n", "68.0 | \n", "14.9 | \n", "14.44 | \n", "7.02 | \n", "59.50 | \n", "335.9 | \n", "
155852 | \n", "2018-05-02 00:03:00 | \n", "91.2 | \n", "68.6 | \n", "46.8 | \n", "73.4 | \n", "63.4 | \n", "64.7 | \n", "75.6 | \n", "63.6 | \n", "66.9 | \n", "... | \n", "65.3 | \n", "76.1 | \n", "57.0 | \n", "68.0 | \n", "68.0 | \n", "14.9 | \n", "14.44 | \n", "7.02 | \n", "59.50 | \n", "335.9 | \n", "
155853 | \n", "2018-05-02 00:04:00 | \n", "91.4 | \n", "68.7 | \n", "46.8 | \n", "73.4 | \n", "63.1 | \n", "65.0 | \n", "79.1 | \n", "67.6 | \n", "67.9 | \n", "... | \n", "68.4 | \n", "79.7 | \n", "59.7 | \n", "68.0 | \n", "68.0 | \n", "14.9 | \n", "14.44 | \n", "7.02 | \n", "59.50 | \n", "335.9 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
714240 | \n", "2019-07-20 23:55:00 | \n", "122.5 | \n", "66.4 | \n", "100.0 | \n", "72.3 | \n", "68.7 | \n", "60.5 | \n", "75.3 | \n", "65.7 | \n", "63.9 | \n", "... | \n", "64.6 | \n", "75.6 | \n", "52.6 | \n", "66.0 | \n", "65.0 | \n", "19.5 | \n", "15.72 | \n", "11.83 | \n", "61.38 | \n", "604.2 | \n", "
714241 | \n", "2019-07-20 23:56:00 | \n", "123.0 | \n", "65.6 | \n", "98.2 | \n", "72.4 | \n", "67.9 | \n", "60.0 | \n", "75.5 | \n", "56.7 | \n", "64.6 | \n", "... | \n", "64.2 | \n", "76.0 | \n", "56.9 | \n", "66.0 | \n", "65.0 | \n", "19.5 | \n", "15.72 | \n", "11.83 | \n", "61.38 | \n", "604.2 | \n", "
714242 | \n", "2019-07-20 23:57:00 | \n", "123.3 | \n", "65.1 | \n", "98.2 | \n", "72.4 | \n", "67.3 | \n", "59.7 | \n", "75.5 | \n", "57.6 | \n", "64.9 | \n", "... | \n", "64.6 | \n", "76.3 | \n", "61.3 | \n", "66.0 | \n", "65.0 | \n", "19.5 | \n", "15.72 | \n", "11.83 | \n", "61.38 | \n", "604.2 | \n", "
714243 | \n", "2019-07-20 23:58:00 | \n", "123.2 | \n", "65.4 | \n", "98.2 | \n", "72.4 | \n", "67.0 | \n", "60.3 | \n", "72.8 | \n", "52.8 | \n", "65.4 | \n", "... | \n", "65.0 | \n", "74.3 | \n", "57.4 | \n", "66.0 | \n", "65.0 | \n", "19.5 | \n", "15.72 | \n", "11.83 | \n", "61.38 | \n", "604.2 | \n", "
714244 | \n", "2019-07-20 23:59:00 | \n", "123.1 | \n", "65.7 | \n", "98.2 | \n", "72.4 | \n", "66.9 | \n", "60.7 | \n", "75.2 | \n", "56.5 | \n", "65.5 | \n", "... | \n", "65.0 | \n", "75.4 | \n", "53.4 | \n", "66.0 | \n", "65.0 | \n", "19.5 | \n", "15.72 | \n", "11.83 | \n", "61.38 | \n", "604.2 | \n", "
516309 rows × 23 columns
\n", "