<jupyter_start><jupyter_text>import libraries<jupyter_code>import matplotlib.pyplot as plt
from PyEMD import CEEMDAN
import math
import time
import tensorflow as tf
import numpy
from tensorflow import keras
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from sklearn import metrics
import dataframe_image as dfi

import Setting
from myfunctions import proposed_method<jupyter_output><empty_output><jupyter_text>Load Data<jupyter_code>import pandas as pd

url_univdorm= 'https://raw.githubusercontent.com/irenekarijadi/RF-LSTM-CEEMDAN/main/Dataset/data%20of%20UnivDorm_Prince.csv'
univdorm= pd.read_csv(url_univdorm)
data_univdorm= univdorm[(univdorm['timestamp'] > '2015-03-01') & (univdorm['timestamp'] < '2015-06-01')]
dfs_univdorm=data_univdorm['energy']
datas_univdorm=pd.DataFrame(dfs_univdorm)

url_univlab= 'https://raw.githubusercontent.com/irenekarijadi/RF-LSTM-CEEMDAN/main/Dataset/data%20of%20UnivLab_Christy.csv'
univlab= pd.read_csv(url_univlab)
data_univlab= univlab[(univlab['timestamp'] > '2015-03-01') & (univlab['timestamp'] < '2015-06-01')]
dfs_univlab=data_univlab['energy']
datas_univlab=pd.DataFrame(dfs_univlab)

url_univclass= 'https://raw.githubusercontent.com/irenekarijadi/RF-LSTM-CEEMDAN/main/Dataset/data%20of%20UnivClass_Abby.csv'
univclass= pd.read_csv(url_univclass)
data_univclass= univclass[(univclass['timestamp'] > '2015-03-01') & (univclass['timestamp'] < '2015-06-01')]
dfs_univclass=data_univclass['energy']
datas_univclass=pd.DataFrame(dfs_univclass)

url_office= 'https://raw.githubusercontent.com/irenekarijadi/RF-LSTM-CEEMDAN/main/Dataset/data%20of%20Office_Abigail.csv'
office= pd.read_csv(url_office)
data_office= office[(office['timestamp'] > '2015-03-01') & (office['timestamp'] < '2015-06-01')]
dfs_office=data_office['energy']
datas_office=pd.DataFrame(dfs_office)

url_primclass= 'https://raw.githubusercontent.com/irenekarijadi/RF-LSTM-CEEMDAN/main/Dataset/data%20of%20PrimClass_Jaden.csv'
primclass= pd.read_csv(url_primclass)
data_primclass= primclass[(primclass['timestamp'] > '2015-03-01') & (primclass['timestamp'] < '2015-06-01')]
dfs_primclass=data_primclass['energy']
datas_primclass=pd.DataFrame(dfs_primclass)
hours=Setting.n_hours
data_partition=Setting.data_partition
max_features=Setting.max_features
epoch=Setting.epoch
batch_size=Setting.batch_size
neuron=Setting.neuron
lr=Setting.lr
optimizer=Setting.optimizer
#proposed method
proposed_method_univdorm=proposed_method(dfs_univdorm,hours,data_partition,max_features,epoch,batch_size,neuron,lr,optimizer)
proposed_method_univlab=proposed_method(dfs_univlab,hours,data_partition,max_features,epoch,batch_size,neuron,lr,optimizer)
proposed_method_univclass=proposed_method(dfs_univclass,hours,data_partition,max_features,epoch,batch_size,neuron,lr,optimizer)
proposed_method_office=proposed_method(dfs_office,hours,data_partition,max_features,epoch,batch_size,neuron,lr,optimizer)
proposed_method_primclass=proposed_method(dfs_primclass,hours,data_partition,max_features,epoch,batch_size,neuron,lr,optimizer)



plt.plot(proposed_method_univdorm[4],label="actual")
plt.plot(proposed_method_univdorm[3],label="predictions",linestyle='dashed')
plt.title('University Dormitory Building') 
    
plt.legend()
plt.xlabel('Time') 
plt.ylabel('kW')
plt.plot(proposed_method_univlab[4],label="actual")
plt.plot(proposed_method_univlab[3],label="predictions",linestyle='dashed')
plt.title('University Laboratory Building') 
    
plt.legend()
plt.xlabel('Time') 
plt.ylabel('kW')
plt.plot(proposed_method_univclass[4],label="actual")
plt.plot(proposed_method_univclass[3],label="predictions",linestyle='dashed')
plt.title('University Classroom Building') 
    
plt.legend()
plt.xlabel('Time') 
plt.ylabel('kW')
plt.plot(proposed_method_office[4],label="actual")
plt.plot(proposed_method_office[3],label="predictions",linestyle='dashed')
plt.title('Office Building') 
    
plt.legend()
plt.xlabel('Time') 
plt.ylabel('kW')
plt.plot(proposed_method_primclass[4],label="actual")
plt.plot(proposed_method_primclass[3],label="predictions",linestyle='dashed')
plt.title('Primary Classroom Building') 
    
plt.legend()
plt.xlabel('Time') 
plt.ylabel('kW')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13678242381289865, 'fraction_numerical': 0.025986298133711314, 'mean_word_length': 10.994334277620396, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '476214', 'license': 'MIT', 'n_tokens_mistral': 1721, 'n_tokens_neox': 1596, 'n_words': 162, 'path': 'Plot Prediction results using proposed hybrid RF-LSTM based CEEMDAN method.ipynb', 'repo_name': 'irenekarijadi/RF-LSTM-CEEMDAN', 'size': '4233'}