!wget --no-check-certificate https://home.isr.uc.pt/~rui/publications/debutanizer_fortuna_dataset.zip
!unzip debutanizer_fortuna_dataset.zip
!wget --no-check-certificate https://home.isr.uc.pt/~rui/publications/WWTP_dataset_1_year.zip
!unzip WWTP_dataset_1_year.zip
!wget --no-check-certificate https://home.isr.uc.pt/~rui/publications/sru_fortuna_dataset.zip
!unzip sru_fortuna_dataset.zip
!wget --no-check-certificate https://home.isr.uc.pt/~rui/publications/OWE.zip
!unzip OWE.zip
--2020-08-30 14:59:35-- https://home.isr.uc.pt/~rui/publications/WWTP_dataset_1_year.zip Resolving home.isr.uc.pt (home.isr.uc.pt)... 193.136.230.49 Connecting to home.isr.uc.pt (home.isr.uc.pt)|193.136.230.49|:443... connected. WARNING: cannot verify home.isr.uc.pt's certificate, issued by ‘CN=TERENA SSL CA 3,O=TERENA,L=Amsterdam,ST=Noord-Holland,C=NL’: Unable to locally verify the issuer's authority. HTTP request sent, awaiting response... 200 OK Length: 17589 (17K) [application/zip] Saving to: ‘WWTP_dataset_1_year.zip’ WWTP_dataset_1_year 100%[===================>] 17.18K 60.5KB/s in 0.3s 2020-08-30 14:59:38 (60.5 KB/s) - ‘WWTP_dataset_1_year.zip’ saved [17589/17589] Archive: WWTP_dataset_1_year.zip inflating: wwtp_1year_time_lag_4.txt inflating: wwtp_1year_time_lag_2.txt inflating: wwtp_1year_time_lag_0.txt
import pandas as pd
import numpy as np
from scipy.io import loadmat
import matplotlib as mpl
import matplotlib.pyplot as plt
Xy = np.loadtxt('SRU_data.txt', skiprows=1)
df_sru = pd.DataFrame(Xy, columns=['u{}'.format(ix)for ix in np.arange(1,6)]+['y{}'.format(ix)for ix in np.arange(1,3)])
SRU = {
"INPUT": ['u%d'%ix for ix in range(1,6)],
"OUTPUT":['y%d'%ix for ix in range(1,3)]
}
print('input size', df_sru[SRU["INPUT"]].shape)
print('output size', df_sru[SRU["OUTPUT"]].shape)
mpl.rcParams['figure.figsize'] = [10, 8]
mpl.rcParams['font.size'] = 20
plt.subplot(2,1,1)
plt.plot(df_sru[SRU["INPUT"]])
plt.subplot(2,1,2)
plt.plot(df_sru[SRU["OUTPUT"]])
plt.show()
input size (10081, 5) output size (10081, 2)
from glob import glob
plt.figure()
for ix, fname in enumerate(glob('wwtp_1year_time_lag_*.txt')):
X_wtp = np.loadtxt(fname)
print(X_wtp.shape)
plt.subplot(3,1,ix+1)
plt.plot(X_wtp)
plt.show()
(360, 12) (360, 11) (360, 11)
Xy = np.loadtxt('wwtp_1year_time_lag_0.txt')
X_wtp, y_wtp = Xy[:,:-1], Xy[:,-1]
ix2 = [8,9]
ix1 = list(set(np.arange(11).tolist()) - set(ix2))
print("input shape", X_wtp[:, ix1+ix2].shape)
print("output shape", y_wtp.shape)
fig = plt.figure()
plt.subplot(311)
plt.plot(X_wtp[:, ix1])
plt.subplot(312)
plt.plot(X_wtp[:, ix2])
plt.ylabel('9th and 10th variables')
plt.subplot(313)
plt.plot(y_wtp)
plt.show()
input shape (360, 11) output shape (360,)
debutanizer = loadmat('debutanizer.mat')
INOUT = [s for s in debutanizer.keys() if not s.startswith('_')]
INPUT = INOUT[:-1]
OUTPUT = INOUT[-1]
df_debu = pd.DataFrame([debutanizer[item].reshape(-1,)for item in INOUT]).T
df_debu.rename(columns={k:v for k,v in enumerate(INOUT)}, inplace=True)
print("input size", df_debu[INPUT].shape)
plt.subplot(211)
plt.plot(df_debu[INPUT])
plt.ylabel('u')
plt.subplot(212)
plt.plot(df_debu[OUTPUT])
plt.ylabel('y')
plt.show()
input size (2394, 7)
Xy_owe = np.loadtxt('OWE/FCCU.txt')
X_owe, y_owe = Xy_owe[:,:6], Xy_owe[:,6]
print(X_owe.shape, y_owe.shape)
plt.subplot(211)
plt.plot(X_owe)
plt.subplot(212)
plt.plot(y_owe)
plt.show()
(104, 6) (104,)