TemporalPaD: a reinforcement-learning framework for temporal feature representation and dimension reduction