Introduction Machine learning is a field of computer science that uses algorithms to analyze data.…