Scaling unknown time series for prediction with RNN I'm trying to build a RNN model to predict arterial blood pressure (ABP) time series based on two other time series, namely, ECG and PPG.
It is available to me a set of multivariate time series of the form [ECG, PPG, ABP]. I use these multivariate time series to train an RNN model (inputs: [PPG, ECG], output [ABP]). The final objective of the model is to predict a [ABP] series that is not in the initial set ([PPG, ECG] series are to be collected in real time through sensors in order to a unknown [ABP] series to be predicted).
To train the RNN model successfully I have to scale (normalize) all the series available in the set (if I don't do this, i.e., don't scale the ABP series, the model outputs a constant). 
The problem is that the different available ABP series have different scales, so I cant't simply use the scaling factors of these series to "inverse" scale the series obtained when the model is fed by the sensor's PPG and ECG signals.
Bottom line, I don't know how to "inverse" scale the output of my model and this is a fundamental task for the problem. So the questions are: how can I work this situation around? What is the best practice in this case?
 A: I was working on similar type of problem where i had to predict Y waveform based on X1, X2, X3 waveforms. I had 70 sets for train and 6 for test. My target variable generally ranges from 100-1000 and inputs range from 0-10 based on the domain knowledge. So, i divided the target by 1000 and input by 10 and it worked.
In case if you are looking for more guided way to do the scaling, check this link.
The author states that choosing right activation function should help. Since the waveform values are real-valued, linear activation function can be used.
A: With time series data it is often helpful to "difference" the data by subtracting each data point from the one following it.  In this case it might be helpful to go one farther and calculate percent log difference.
The equations below assume a regular, discrete time series with data points following each other at equal time intervals.
To calculate simple difference:
$$d_t = x_t - x_{t-1}$$
To calculate percent log difference:
$$pld_t = 100 \left( \log {\frac {x_t} {x_{t-1}}} \right)$$
Differencing
Differencing is often applied to remove the trend from a time series that goes up more often than not, but even if the "trend" slope is zero differencing can be useful for subtracting out the overall mean level.
Differencing preserves the original units of measurement, which may be unhelpful for relating one variable to another that has very different units of measurement.  In that case we might want to calculate relative differences.
Relative difference
We could calculate simple relative differences, perhaps as a percent.
$$dpct_t = 100 \left( \frac {x_t - x_{t-1}} {x_{t-1}} \right) =
100 \left( \frac {x_t} {x_{t-1}} - 1 \right)$$
However, relative differences are asymmetrical with respect to positive versus negative changes.  For variables that are always non-negative, the value can decrease by at most 100% from one time period to another (a relative difference of -100%), but there is no limit to how big a relative increase could be.
Percent log difference
Percent log difference (pld) provides a measure of relative change that is symmetric around zero.  This means that if you observe a pld of -P% followed by a pld of +P%, or vice versa, the resulting level is back to the starting level.  The same is not true of simple relative difference.
Undifferencing
One challenge posed by differencing in all the forms discussed above is that we lose information about the level of the original variable.  Given differenced data alone, you cannot easily recreate the original series along with the correct units of measurement.  Some sort of calibration is necessary.  This could be as simple as arbitrarily assigning the value 100 to the starting value.  Alternatively, you could compare the starting value to a known reference to establish a baseline value in the desired measurement units.
Sample data
The table below demonstrates differencing, relative difference, and log percent difference applied to a toy time series.  In this sample data I have natural logarithms, because this yields values close to simple percent differences (but more well-behaved in terms of symmetry around zero).




Time
Data
Diff
PctDiff
LogPctDiff




0
95





1
100
5
5.3
5.1


2
105
5
5.0
4.9


3
100
-5
-4.8
-4.9


4
95
-5
-5.0
-5.1









Mean:
99
0
0.1
0.0



