Geometric Principles for Machine Learning of Dynamical Systems