Statistics for Representation learning for regime detection in financial markets