Invariant Measures for Data-Driven Dynamical System Identification: Analysis and Application