Note
Click here to download the full example code
Comparison of LSTM with different transformations
from ai4water.models import LSTM
from ai4water.utils.utils import get_version_info
from ai4water.experiments import TransformationExperiments
from ai4water.hyperopt import Categorical, Integer
from ai4water.utils.utils import dateandtime_now
from ai4water.datasets import busan_beach
for k,v in get_version_info().items():
print(f"{k} version: {v}")
python version: 3.7.9 (default, Oct 19 2020, 15:13:17)
[GCC 7.5.0]
os version: posix
ai4water version: 1.06
lightgbm version: 3.3.5
tcn version: 3.5.0
catboost version: 1.1.1
xgboost version: 1.6.2
easy_mpl version: 0.21.2
SeqMetrics version: 1.3.4
tensorflow version: 2.7.0
keras.api._v2.keras version: 2.7.0
numpy version: 1.21.1
pandas version: 1.3.4
matplotlib version: 3.5.3
h5py version: 3.8.0
joblib version: 1.2.0
lookback = 14
data = busan_beach()
input_features = data.columns.tolist()[0:-1]
output_features = data.columns.tolist()[-1:]
class MyTransformationExperiments(TransformationExperiments):
def update_paras(self, **kwargs):
_layers = LSTM(units=kwargs['units'],
input_shape=(lookback, len(input_features)),
activation=kwargs['activation'])
y_transformation = kwargs['y_transformation']
if y_transformation == "none":
y_transformation = None
return {
'model': _layers,
'batch_size': int(kwargs['batch_size']),
'lr': float(kwargs['lr']),
'y_transformation': y_transformation
}
cases = {
'model_None': {'y_transformation': 'none'},
'model_minmax': {'y_transformation': 'minmax'},
'model_zscore': {'y_transformation': 'zscore'},
'model_robust': {'y_transformation': 'robust'},
'model_quantile': {'y_transformation': 'quantile'},
'model_log': {'y_transformation': {'method':'log', 'treat_negatives': True, 'replace_zeros': True}},
"model_pareto": {"y_transformation": "pareto"},
"model_vast": {"y_transformation": "vast"},
"model_mmad": {"y_transformation": "mmad"}
}
search_space = [
Integer(low=10, high=30, name='units', num_samples=10),
Categorical(categories=['relu', 'elu', 'tanh', "linear"], name='activation'),
Categorical(categories=[4, 8, 12, 16, 24, 32], name='batch_size'),
Categorical(categories=[0.05, 0.02, 0.009, 0.007, 0.005,
0.003, 0.001, 0.0009, 0.0007, 0.0005, 0.0003,
0.0001, 0.00009, 0.00007, 0.00005], name='lr'),
]
x0 = [16, "relu", 32, 0.0001]
experiment = MyTransformationExperiments(
cases=cases,
input_features=input_features,
output_features = output_features,
param_space=search_space,
x0=x0,
verbosity=0,
epochs=100,
exp_name = f"ecoli_lstm_y_exp_{dateandtime_now()}",
ts_args={"lookback": lookback},
save=False
)
experiment.fit(data = data, run_type='dry_run')
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
running None model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
running minmax model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:959: RuntimeWarning: overflow encountered in square
s = s**2
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:283: RuntimeWarning: invalid value encountered in log
log_a = np.log(a)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:959: RuntimeWarning: overflow encountered in square
s = s**2
running zscore model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:959: RuntimeWarning: overflow encountered in square
s = s**2
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:283: RuntimeWarning: invalid value encountered in log
log_a = np.log(a)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:959: RuntimeWarning: overflow encountered in square
s = s**2
running robust model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
running quantile model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in true_divide
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in true_divide
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2691: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2692: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[None, :]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in true_divide
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in true_divide
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2691: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2692: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[None, :]
running log model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in subtract
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/_methods.py:230: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/nanfunctions.py:1396: RuntimeWarning: All-NaN slice encountered
overwrite_input, interpolation)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in subtract
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/_methods.py:230: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1135: RuntimeWarning: overflow encountered in square
return sqrt(np.average((self.true - self.predicted) ** 2, axis=0, weights=weights))
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2536: RuntimeWarning: invalid value encountered in subtract
X -= avg[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_main.py:486: RuntimeWarning: overflow encountered in square
return float(np.average((self.true - self.predicted) ** 2, axis=0, weights=weights))
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1171: RuntimeWarning: overflow encountered in square
numerator = (weight * (self.true - self.predicted) ** 2).sum(axis=0,
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:951: RuntimeWarning: invalid value encountered in subtract
a_zero_mean = a - mean
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/nanfunctions.py:1545: RuntimeWarning: invalid value encountered in subtract
np.subtract(arr, avg, out=arr, casting='unsafe')
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:4009: RuntimeWarning: invalid value encountered in subtract
diff_b_a = subtract(b, a)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:980: RuntimeWarning: overflow encountered in square
_nse = 1 - sum((self.predicted - self.true) ** 2) / sum((self.true - np.mean(self.true)) ** 2)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/nanfunctions.py:1396: RuntimeWarning: All-NaN slice encountered
overwrite_input, interpolation)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in subtract
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/_methods.py:230: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2536: RuntimeWarning: invalid value encountered in subtract
X -= avg[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/scipy/stats/stats.py:951: RuntimeWarning: invalid value encountered in subtract
a_zero_mean = a - mean
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/nanfunctions.py:1545: RuntimeWarning: invalid value encountered in subtract
np.subtract(arr, avg, out=arr, casting='unsafe')
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:4009: RuntimeWarning: invalid value encountered in subtract
diff_b_a = subtract(b, a)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_main.py:486: RuntimeWarning: overflow encountered in square
return float(np.average((self.true - self.predicted) ** 2, axis=0, weights=weights))
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1135: RuntimeWarning: overflow encountered in square
return sqrt(np.average((self.true - self.predicted) ** 2, axis=0, weights=weights))
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1171: RuntimeWarning: overflow encountered in square
numerator = (weight * (self.true - self.predicted) ** 2).sum(axis=0,
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:980: RuntimeWarning: overflow encountered in square
_nse = 1 - sum((self.predicted - self.true) ** 2) / sum((self.true - np.mean(self.true)) ** 2)
running pareto model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
running vast model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
running mmad model
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
experiment.compare_errors('rmse', data=data)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in subtract
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/_methods.py:230: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2536: RuntimeWarning: invalid value encountered in subtract
X -= avg[:, None]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2691: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2692: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[None, :]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
experiment.compare_errors('r2', data=data)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in subtract
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/_methods.py:230: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2536: RuntimeWarning: invalid value encountered in subtract
X -= avg[:, None]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2691: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2692: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[None, :]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
experiment.compare_errors('nrmse', data=data)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in subtract
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/_methods.py:230: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2536: RuntimeWarning: invalid value encountered in subtract
X -= avg[:, None]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2691: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2692: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[None, :]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
experiment.taylor_plot(data=data)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/SeqMetrics/_rgr.py:1148: RuntimeWarning: invalid value encountered in subtract
zy = (self.predicted - np.mean(self.predicted)) / np.std(self.predicted, ddof=1)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/_methods.py:230: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2536: RuntimeWarning: invalid value encountered in subtract
X -= avg[:, None]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2691: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[:, None]
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/function_base.py:2692: RuntimeWarning: invalid value encountered in true_divide
c /= stddev[None, :]
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
<Figure size 900x700 with 2 Axes>
experiment.compare_edf_plots(data=data)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/core/function_base.py:134: RuntimeWarning: invalid value encountered in double_scalars
delta = stop - start
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
experiment.compare_regression_plots(data=data)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/numpy/lib/nanfunctions.py:1396: RuntimeWarning: All-NaN slice encountered
overwrite_input, interpolation)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
experiment.compare_residual_plots(data=data)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
********** Removing Examples with nan in labels **********
***** Training *****
input_x shape: (121, 14, 13)
target shape: (121, 1)
********** Removing Examples with nan in labels **********
***** Validation *****
input_x shape: (31, 14, 13)
target shape: (31, 1)
********** Removing Examples with nan in labels **********
***** Test *****
input_x shape: (66, 14, 13)
target shape: (66, 1)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
/home/docs/checkouts/readthedocs.org/user_builds/ai4water-experiments/envs/latest/lib/python3.7/site-packages/ai4water/preprocessing/transformations/_transformations.py:570: RuntimeWarning: overflow encountered in exp
return self.inv_func(x)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
dot plot of model could not be plotted due to ('You must install pydot (`pip install pydot`) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
assigning name Input to IteratorGetNext:0 with shape (None, 14, 13)
<Figure size 640x480 with 9 Axes>
experiment.loss_comparison()
<AxesSubplot:>
Total running time of the script: ( 1 minutes 23.557 seconds)