Generalization Of System Identification Objective Functions Through Stochastic Hidden Markov Models For Regularization, Smoothness, And Uncertainty Quantification