Introduction Machine learning is a subset of artificial intelligence (AI). It can be used to…