Open tdingquan opened 2 years ago
Maybe the coder forgot to turn the list into
numpy.ndarray
, because he just use thez_score
withdata = (data - mean) / std
. Thedata
isnumpy.ndarray
, so it actually turns into-
operand ofnumpy.ndarray
.
So you can try
scale = np.array(norm_statistic['max']) - norm_statistic['min'] + 1e-5
instead of
scale = norm_statistic['max'] - norm_statistic['min'] + 1e-5
This is a useful trick.
Correct. I chose to turn the list into numpy.array before the -
operation.
When using min-max method on ECG data, we will encounter error of "unsupported operand type(s) for -: 'list' and 'list'".
Line 10, forecast_dataloader.py