Thickness Determination of Ultrathin 2D Materials Empowered by Machine Learning Algorithms