{ "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 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", "import tensorflow as tf" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import tensorflow as tf\n", "tf.config.list_physical_devices('GPU')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "merged = pd.read_csv(r'../data/long_merge.csv')\n", "\n", "zone = \"47\"\n", "\n", "if zone in [\"36\", \"37\", \"38\", \"39\", \"40\", \"41\", \"42\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\", \"70\"]:\n", " rtu = \"rtu_001\"\n", " wing = \"hvac_N\"\n", "elif zone in [\"18\", \"25\", \"26\", \"45\", \"48\", \"55\", \"56\", \"61\"]:\n", " rtu = \"rtu_003\"\n", " wing = \"hvac_S\"\n", "elif zone in [\"16\", \"17\", \"21\", \"22\", \"23\", \"24\", \"46\", \"47\", \"51\", \"52\", \"53\", \"54\"]:\n", " rtu = \"rtu_004\"\n", " wing = \"hvac_S\"\n", "else:\n", " rtu = \"rtu_002\"\n", " wing = \"hvac_N\"\n", "#merged is the dataframe\n", "sorted = merged[[\"date\"]+[col for col in merged.columns if zone in col or rtu in col or wing in col]+[\"hp_hws_temp\", \"aru_001_cwr_temp\" , \"aru_001_cws_fr_gpm\" ,\"aru_001_cws_temp\",\"aru_001_hwr_temp\" ,\"aru_001_hws_fr_gpm\" ,\"aru_001_hws_temp\"]]\n", "sorted" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | date | \n", "hp_hws_temp | \n", "rtu_003_sat_sp_tn | \n", "rtu_003_fltrd_sa_flow_tn | \n", "rtu_003_sa_temp | \n", "rtu_003_pa_static_stpt_tn | \n", "rtu_003_oa_flow_tn | \n", "rtu_003_oadmpr_pct | \n", "rtu_003_econ_stpt_tn | \n", "rtu_003_ra_temp | \n", "... | \n", "rtu_003_rf_vfd_spd_fbk_tn | \n", "rtu_003_fltrd_gnd_lvl_plenum_press_tn | \n", "rtu_003_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", "65.0 | \n", "13558.539 | \n", "65.5 | \n", "0.6 | \n", "0.000000 | \n", "34.6 | \n", "65.0 | \n", "67.9 | \n", "... | \n", "49.9 | \n", "0.04 | \n", "0.05 | \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", "65.0 | \n", "13592.909 | \n", "65.6 | \n", "0.6 | \n", "5992.059572 | \n", "34.6 | \n", "65.0 | \n", "67.9 | \n", "... | \n", "49.4 | \n", "0.04 | \n", "0.04 | \n", "NaN | \n", "NaN | \n", "11.64 | \n", "11.51 | \n", "8.1 | \n", "79.07 | \n", "86.7 | \n", "
2 rows × 23 columns
\n", "