Machine learning is a field of computer science that gives…