maxim5 / time-series-machine-learning

Machine learning models for time series analysis
Apache License 2.0
369 stars 103 forks source link

Pay attention for data leak in Conv1D #12

Open PietroAmin opened 4 years ago

PietroAmin commented 4 years ago

From Keras docs: padding: One of "valid", "causal" or "same" (case-insensitive). "valid" means "no padding". "same" results in padding the input such that the output has the same length as the original input. "causal" results in causal (dilated) convolutions, e.g. output[t] does not depend on input[t + 1:]. A zero padding is used such that the output has the same length as the original input. Useful when modeling temporal data where the model should not violate the temporal order. See WaveNet: A Generative Model for Raw Audio, section 2.1.

You should use padding='casual' as for the wavenet model case.