Machine Learning Algorithms for Pattern Discovery in Spatio-temporal Data With Application to Brain Imaging Analysis