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.

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
3 answers
3k 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?
Bhabesh Roy's user avatar
2 votes
1 answer
2k views

Plotting confusion matrix for multi classification problem

I am using google colab to solve a multi-classification problem. I am trying to plot the confusion matrix for this problem, I have tried doing so using : ...
AAA's user avatar
  • 145
2 votes
1 answer
101 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 ...
belz's user avatar
  • 21
2 votes
0 answers
229 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, ...
data_analyst's user avatar
2 votes
0 answers
1k 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 ...
Stephen's user avatar
  • 272
1 vote
0 answers
79 views

Azure AutoML: decimal numbers in confusion matrix

I have been running Azure AutoML on a binary classification task. When I visualize the performance and the confusion matrix in particular, I observe the following: How can I have decimal numbers in ...
jerorx's user avatar
  • 111
1 vote
1 answer
830 views

Difficulties in create a confusion matrix in R for Yes or No

I am new to regression and confusion matrix and trying to create a confusion matrix from logistic binary regression model. I am trying to create a confusion matrix from Yes or No values from the ...
painintheass's user avatar
1 vote
0 answers
50 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 ...
Minnie's user avatar
  • 21
1 vote
0 answers
34 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" ...
StellarFan's user avatar
1 vote
0 answers
52 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 ...
Abdelmalek Mallek's user avatar
1 vote
0 answers
1k 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 ...
Panicum's user avatar
  • 111
1 vote
0 answers
150 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
Andrei-Cristian Rad's user avatar
1 vote
0 answers
135 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 ...
Milan's user avatar
  • 111
1 vote
0 answers
17 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 ...
Bobby's user avatar
  • 114
1 vote
0 answers
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 ...
Monica Heddneck's user avatar
1 vote
0 answers
48 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 ...
user3377126's user avatar
0 votes
0 answers
10 views

Finding Accuracy, Recall, Precision, and F1 from Matlab Confusion Matrix

I'm working on a project to find the highest accuracy between KNN and a Decision Tree for Classification using Matlab. How to calculate the Accuracy, Recall, Precision, and F1 from the output below? ...
Istiamel's user avatar
0 votes
0 answers
10 views

warning 'newdata' had X row but variables found have Y rows

Linear Discriminant Analysis (LDA)+logistic regression model lda_model <- lda(train_labels ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width, data = train_data) LDA scores for the training ...
Maisha Maliha's user avatar
0 votes
1 answer
281 views

How many Non-frauds would be blocked to stop one Fraud based on the given confusion matrix?

One of the questions in a recent online test that I couldn't answer is below(I couldn't copy paste exact question, so this one is totally from memory. Kindly excuse in case of poor wording.) We have a ...
a_jelly_fish's user avatar
0 votes
0 answers
12 views

One class confusion matrix notation for model evaluation

A one class classification set-up for a set of rules acting as a model, where each input is a whole dataset model makes some decision within the dataset for each entry output is decisions made for ...
zaira's user avatar
  • 101
0 votes
1 answer
52 views

why my accuracy and recall become higher in testing than training. How to interpret

Why in hidden layer 2 and 3 in neural networks scratch, the accuracy and recall I got low, but in testing the accuracy and recall become higher. In hidden layer 4 it's get weird when sampling strategy ...
Azareel's user avatar
0 votes
0 answers
728 views

How does the background class work in object detection?

I am using YOLOv5 for object detection. I understand that any labelled classes that are not predicted, that is, false negatives (FN) shows up as background. But how are the false positive (FP) being ...
Icecream Pudding's user avatar
0 votes
0 answers
111 views

High Recall and Low Precision for Binary CNN model

I was training a CNN model for binary classification. The training and validation accuracy seemed good. However, the precision is low and the recall is high (High false positive). ...
Esraa Abdelmaksoud's user avatar
0 votes
0 answers
271 views

how to reduce overfitting and improve confusion matrix

I am trying to apply the following model on my data which is consists of (4030 samples as 5 classes) each sample is MFCC features which is extracted from an audio clip consisting of (20 second) and I ...
Beba.S's user avatar
  • 37
0 votes
0 answers
11 views

why is H2O using only a part of the data?

I have this dataframe: ...
Ben's user avatar
  • 540
0 votes
0 answers
31 views

Logistic Regression test accuracy vs deployment

I am working on a problem where I make some weekly predictions. I gathered the data myself and did some pre-processing steps and I end up with 6 features. I split the dataset 60-20-20 in train, ...
shinjitos's user avatar
0 votes
1 answer
47 views

Discrepancy between cross-validation and un-seen data predictions

I am facing an issue with an imbalanced dataset. The dataset contains 20% targets and 80% non-targets. I am expecting a confusion matrix below when I give un-seen data to the trained model. ...
Swati Shah's user avatar
0 votes
0 answers
86 views

Can you use a Confusion Matrix for a image detection problem?

I have read the classic examples of using a Confusion Matrix for a classification problem. ("Does a patient have cancer, or not?) The ML system I am working with is for detecting objects in an ...
KansaiRobot's user avatar
0 votes
0 answers
2k views

How to track loss and accuracy in PyTorch?

I have made model and it is working fine for the MNIST dataset but further in the assignment it says to track loss and accuracy of the model, which I do not know how to do it. I have also written some ...
Gamar Choba's user avatar
0 votes
1 answer
343 views

Unable to generate confusion matrix

I am using keras flow from directory for image segmentation. Following are my codes ...
Vikram R S's user avatar
0 votes
1 answer
1k 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.
Francesca Gavins's user avatar
0 votes
0 answers
238 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 ...
Doopy's user avatar
  • 101
0 votes
0 answers
105 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 ...
brad987's user avatar
0 votes
0 answers
36 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 ...
Bingo Man's user avatar
0 votes
0 answers
757 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 ...
Zack's user avatar
  • 23
0 votes
0 answers
167 views

How to plot a wordCloud for essay text from a confusion matrix false positive rate count?

I have an essay of text(BOW) and I have modelled it using let's say any model and plotted the confusion matrix and that I have got FPR, I need to plot a word cloud which shows the words due to which ...
Prasoon Singh's user avatar
-1 votes
1 answer
30 views

Printing the tweets that were incorrectly predicted after applying a machine learning classifier

I applied the random forest classifier to my csv file to classify the tweets as spam or not spam and after an accuracy of 93%, when I printed the confusion matrix I got [[1068 105] [ 65 1262]]. Now ...
tamilini's user avatar