# Questions tagged [confusion-matrix]

A confusion matrix is a special contingency table used to evaluate the predictive accuracy of a classifier. Predicted classes are listed in rows and actual classes in columns, with counts of respective cases in each cell.

29 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1k views

### How do I calculate the range of a F1-score from a confusion matrix of 3 class,A,B,C

Is there any support function to calculate the average F1-score range?
25 views

### Is it ok for precision and recall metrics if a small minority of samples are both false positives and true positives?

I am working on a multi-label classification NN using genomic data. there are 10 samples and 2 ground truth labels (age and gender) for every sample. I use a sigmoid activation at the final layer and ...
52 views

### Why rejection of a true null hypothesis is called type I error?

I’m comparing two confusion matrices: https://en.wikipedia.org/wiki/Confusion_matrix#Table_of_confusion https://en.wikipedia.org/wiki/Type_I_and_type_II_errors The 2nd is rotated, the Decision is on ...
183 views

### Do I use class weights to penalize false negatives or threshold optimization to improve recall?

I built a Random Forest model for a binary classification problem.Both the classes in the target variable are balanced. My main class of interest is 'class 1'. False negatives are more costly to me, ...
843 views

### what's the best way to plot a confusion matrix in a multilabel setting?

In a multilabel setting a training example could be a, b, (a, b), d, c, (d, c), etc. This makes it a bit hard to come up with a helpful confusion matrix because the ...
20 views

### Confusion matrix of 3*2

I would like to include confusion matrix in my research report. I have a binary classification problem. The positive class is further divided into two types for example: Real Positive and Obstruction ...
9 views

### Recall/Precision Metrics on Azure AutoML seem to be oriented to majority class, and I'm trying to focus on minority class

I am running some experiments in Azure using AutoML. My problem is a binary classification one, with highly imbalanced classes (basically trying to predict what factors make a deal "WON" ...
17 views

### How to interpret the confusion matrix and compare the result of features extraction with LBP and Haralick

I'm begginer in deep learning so I tried to execute a code of liveness face detection from github in this link :https://github.com/imironica/liveness , so when I tried to run features extraction with ...
191 views

### Calculate the number of TP, FP, FN for the object detection task with many classes

I am trying to count the number of True Positives (TP), False Positives (FP), and False Negatives (FN) for object detection task with two classes. I assumed that: TP - is the detection with ...
41 views

### Does it make sense to build a ROC for a decision tree where there are multiple threshold you can adjust?

I understand building a ROC curve when the output is a probability, say, from a logistic regression model. You can build a ROC curve by varying the cutoff threshold. But what about decision trees of ...
90 views

### Generating a Confusion Matrix from a Seaborn Heatmap

Is there a way I can reverse engineer a Seaborn heatmap saved as .png? I want to get the array of values out of it. Does the library provide a "load-from-image" facility, or is there any sta
103 views

### Is this analysis good or not?

I am doing a project in plant pest detection using CNN. There are four classes each having about 1000 images.I have use alexnet architecture for training. I think confusion matrix is not correct. What ...
14 views

### Compute an ROC for a hybrid model where only one of the model components computes class probabilities

I've created a hybrid model by taking an existing decision engine (TRUE/FALSE output) and supplementing it with a random forest ...
3k views

### Can tuning individual precision and recall classification thresholds improve deep learning models?

I learned that Keras doesn't have a built-in way to set a threshold for precision and accuracy when building a classifier. Courtesy of a solution here, I wanted to see what would happen when I fit a ...
47 views

### Trying to come up with a feature to improve emotion classifier based on facial movement using facial landmarks

I managed to create an emotion recognition system that uses dense optical flow on each entire frame. While the accuracy range is within 80-90% with cross-validation, I am aiming to improve the ...
39 views

### Unable to generate confusion matrix

I am using keras flow from directory for image segmentation. Following are my codes ...
25 views

### Viewing false positive rows in python

I got values for the confusion matrix using: tn, fp, fn, tp = confusion_matrix(y_true, y_pred).ravel() 10000 13000 500 1500 Now, I wish to see what data is in the ...
23 views

### scikit-learn sample weight interpretation

I'm trying to use scikit-learn to plot a confusion matrix from raw data I have obtained (contains just predictions and ground truths). The data contains a total of 4 classes: ...
9 views

### Metrics for each class in a multi-class training/testing dataset

I am working with the NSL_KDD Dataset for cyber security and training a number of different models. There are five different classes: benign, dos, probe, r2u, and u2l. (I am using scikitlearn.) I ...
37 views

### Weighted accuracy, sensitivity and specificity

I have a confusion matrix TN= 27 FP=20 FN =11 TP=6 I want to calculate the weighted average for accuracy, sensitivity and specificity. I know the equation but unsure how to do the weighted averages.
44 views

### How do I aggregate cross-validation results for per-sample insights?

I'm trying to do feature engineering for point cloud data with three classes, and after having finished implementing the most obvious and simplest features with somewhat good results I'd like to use ...
65 views

### Confusion matrix : Train data accuracy lower than test data accuracy and 95%CI meaning

Let's say that I have training data and test data. I trained the model with the training data and then constructed a confusion matrix of the predictions of both. I am getting that the prediction of ...
13 views

### Evaluate Model Node in Azure ML Studio does not take all the rows of the dataset in confusion matrix

I have this dataset in which the positive class consists of component failures for a specific component of the APS system. I am doing Predictive Maintenance using Microsoft Azure Machine Learning ...
23 views

### Confusion matrix, when mistakes below diagonal are better than above the diagonal

I have a classification problem and I am producing a confusion matrix. Ideally one wants to get all results in the diagonal. I get quite many points around diagonal for different algorithms. Still for ...
21 views

### Calculating Uncertainty for categorical predictions

I am wondering what is the best way to calculate the uncertainty for my categorical predictions. I have created a model that predicts what rating a movie is getting based on certain keywords and the ...
32 views

### Formulate Confusion Matrix from Precision Score

I have the precision scores from 5 classes. Is it possible to create the confusion matrix from that scores. While running the code, I only saved those precision values by mistake. So now I want to ...
127 views

### Plotting scikit-learn confusion matrix returns no values in the last class

I am attempting to create a confusion matrix using Scikit-Learn for a multiclass classification CNN, and it works well except for the fact that it does not provide ...