1

Im using Random Forest and I want to use confusion matrix to calculate false positive and false negative but I achieved the bellow error:

from sklearn.matrics import confusion_matrix ImportError: No module named matrics

2
  • 3
    Welcome to Ask Ubuntu! You certainly got me confused ;-) I assume that with Random Forest you mean the machine learning method, but can you tell us more about it? Is this a python program? How is this related to Ubuntu?
    – THelper
    May 14, 2019 at 6:56
  • 1
    @THelper This is an easy peasy Python import question that doesn't require diving into either Random Forest or machine learning to answer it because all the information required to answer it is in the python3-sklearn package.
    – karel
    May 14, 2019 at 9:54

1 Answer 1

3

The correct command (metrics not matrics) to import confusion_matrix is:

from sklearn.metrics import confusion_matrix

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .