Optimal data-driven estimation of generalized Markov state models for non- equilibrium dynamics