Dynamic power management using Machine learning algorithm