Machine learning (ML) is a branch of artificial intelligence (AI) that enables computers to learn patterns from data and make predictions…