In this paper, we proposed a novel approach to optimize resource allocation in cloud computing using machine learning algorithms. Our results demonstrate the potential of machine learning in improving resource allocation efficiency. Future research directions include exploring the application of our approach in other domains.