It is important to understand confusion matrices in order to evaluate the performance of machine…