Categorical and geometric methods in statistical, manifold, and machine learning