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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 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
1 vote
2 answers
61 views

Does a confusion matrix make sense for extraction tasks?

I'm extracting company names from text blobs. I'm trying to calculate recall. Confusion matrices makes more sense to me from a binary classification point of view, ...
opyate's user avatar
  • 131
1 vote
1 answer
229 views

How to calculate the training accuracy of a decision tree?

The hint given was to construct a confusion matrix.
Praveent Thamil Mani's user avatar
0 votes
0 answers
12 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
2 answers
92 views

How to improve accuracy on a single class out of 3 classes in model

I am training a classification model with 3 classes using a deep neural network. The classes have been resampled and balanced. I have around 600000 samples... equally distributed. The dataset is also ...
Fr_nkenstien's user avatar
0 votes
1 answer
316 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
-1 votes
2 answers
76 views

Recall and Precision ML models

I use decision trees for a binary classification. To evaluate the model, I use K-fold cross-validation, where k = 10. When I run the model n times, I get a relatively constant accuracy across all ...
Jan Jansen's user avatar
0 votes
1 answer
40 views

9-dimensional data classification

I have a dataset with 9 columns and 20 million rows. I have now split the dataset into two parts using IQR. One part is my inliers, the other part is my outliers. I now want to build a categorizer ...
Sponge_Data_45'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
3 votes
2 answers
1k views

How to read confusion matrix from multiclass dataset?

I have a dataset with multi class for classification. After train and test, tried to plot with confusion matrix. And I found it really different with dataset with simple label true false or yes no. So ...
yozawiratama's user avatar
0 votes
1 answer
55 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
2 votes
2 answers
572 views

Some simple questions about confusion matrix and metrics in general

I will first tell you about the context then ask my questions. The model detects hate speech and the training and testing datasets are imbalanced (NLP). My questions: Is this considered a good model? ...
FjkgB's user avatar
  • 89
0 votes
0 answers
761 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
1 vote
1 answer
35 views

What are valid measures for reporting k-fold score in the case of confusion-matrix?

I know when model is made to predict a float value, a common approach to report the models validation is using k-fold technique and calculating the average of all folds accuracy (here is a similar ...
morteza's user avatar
  • 11
3 votes
2 answers
472 views

Precision, recall and importance of them in the imbalance problem

I have a test dataset. The dataset is an imbalanced dataset. The total training instances for the dataset is 543 among them minority class(yes) is 75 and the majority class(No) is 468. The class of ...
Encipher's user avatar
  • 359
4 votes
1 answer
252 views

Error rate of a class from confusion matrix

My professor gives a multiclass confusion matrix and asks for the error rate of a certain class. Unfortunately, the professor refuses to give a definition. I think the closest value to an error rate ...
Pippo's user avatar
  • 143
0 votes
2 answers
1k views

What mean a column in zero in confusion matrix?

When training my model and reviewing the confusion matrix, there are completely zero columns for each specific category, what does this mean, is there an error or how do I interpret it? I use the ...
Dicson Ferney Quimbayo's user avatar
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
0 votes
0 answers
273 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
1 vote
3 answers
2k views

How to add class labels to confusion matrix of multi class classification

How do I add class labels to the confusion matrix? The label display number in the label not the actual value of the label Eg. labels = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',...
seyinia's user avatar
  • 23
1 vote
1 answer
175 views

How can I use a confusion matrix in image captioning?

I read that a confusion matrix is used with image classification but if I need to draw it with image captioning how to use it or ...
Lei's user avatar
  • 57
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
1 vote
1 answer
164 views

Deep Learning accuracy vs Confusion Matrix accuracy

I am working on deep learning with fer2013 dataset. After training the model I got val_precision: 0.9168 (precision: 0.8492) ...
prilia's user avatar
  • 113
1 vote
1 answer
2k views

specificity for 3 class

I was reading an answer in qoura to calculate the specificity of a 3 class classifier from a confusion matrix. In the below answer https://www.quora.com/How-do-I-get-specificity-and-sensitivity-from-a-...
Arun Jose's user avatar
  • 125
2 votes
2 answers
918 views

How to balance sensitivity(sn) and specificity(sp) of an Artificial Neural Network model?

I have been working on a binary classification problem of protein sequences. I have used a feed-forward neural network with two hidden layers. I have the training and validation accuracy/loss curves ...
Suresh Pokharel's user avatar
1 vote
1 answer
839 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
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
1 answer
105 views

What happens to auc when true positive rate grows

How does change in true positive rate affects AUC? Does increase of TPR lead to increase of AUC as well?
Ir8_mind's user avatar
  • 183
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
0 votes
0 answers
87 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
1 vote
1 answer
1k views

Confusion matrix - one class with zero values

I'm applying the Random Forest classifier on a dataset with 645 records and 12 features (selected by KBest method). This dataset contains a class with 4 possible values (1..4). When I plot the ...
mr x's user avatar
  • 21
0 votes
1 answer
25 views

Should I consider unreadable records in confusion matrix while calculating accuracy?

I have 6 classes in my dataset and model. Dataset is regarding ECG signal Having x number of records for each of these classes. The confusion matrix looks like this - My question is, should I ...
Jhon Patric's user avatar
1 vote
1 answer
2k views

In multi-class, is the average accuracy of each class in confusion metrics equal to the accuracy calculated from cross validation?

When I calculate accuracy through cross-validation, it gives me a different accuracy than when I calculate through confusion metrics. Why does it give different accuracy? Is overall calculated ...
Fatima's user avatar
  • 21
1 vote
1 answer
205 views

Imbalanced classification task – Discrepancy between learning curves and test set evaluation

I have a binary classification task related to customer churn for a bank. The dataset contains 10,000 instances and 11 features. The target variable is imbalanced (80% remained as customers (0), 20% ...
KK_o7's user avatar
  • 67
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
368 views

Confusion matrix with different levels

I want to print a confusion matrix, but data and reference have not the same level. How can I do? this is my actual code: ...
Inuraghe's user avatar
  • 481
2 votes
1 answer
642 views

Is it possible to combine two confusion matrices?

Assume I have two different algorithms that tests whether a given image contains a goat or not. I apply these two algorithms to two different datasets and obtain two confusion matrices. Now I want to ...
Levent's user avatar
  • 123
4 votes
1 answer
516 views

How to create a confusion matrix for k-means with two features?

I have the need to do a confusion matrix for data run through k-means with two features. I am aware that this is a clustering algorithm and not a classification algorithm but I have seen some ...
Colin Crook's user avatar
0 votes
1 answer
902 views

How do I calculate precision, recall, specificity, sensitivity manually?

I have actual class labels and predicted class labels: ...
Jhon Patric's user avatar
0 votes
2 answers
39 views

Confusion matrix terminology

I am working on machine learning with a supervised problem with 2 classes: NO and YES, and I need some precision about confusion matrix. I read 2 differents terminologies, some writes matrix confusion ...
user979974's user avatar
3 votes
3 answers
908 views

How are scores calculated for each class of binary classification

The formula for Precision is TP / TP + FP, but how to apply it individually for each class of a binary classification problem, For example here the precision, recall and f1 scores are calculated for ...
Jainam Shroff's user avatar
1 vote
1 answer
151 views

Comparison of classifier confusion matrices

I tried implementing Logistic regression, Linear Discriminant Analysis and KNN for the smarket dataset provided in "An Introduction to Statistical Learning" in python. Logistic Regression ...
NoobHere's user avatar
1 vote
0 answers
53 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
0 votes
1 answer
346 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
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
0 votes
1 answer
48 views

Confusion matrix and accuracy not in sync

I am getting the following result for the confusion matrix and accuracy for a logistic regression model. ...
ravan's user avatar
  • 1
0 votes
1 answer
918 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 ...
Tarzan's user avatar
  • 13
0 votes
1 answer
233 views

How is there an inverse relation between precision and recall?

What I know? Firstly, Precision= $\frac{TP}{TP+FP}$ Recall=$\frac{TP}{TP+FN}$ What book says? A model that declares every record has high recall but low precision. I understand that if predicted ...
achhainsan's user avatar
1 vote
1 answer
77 views

Classification report and confusion matrix problem

I am working on sign language recognition system using HOG and KNN. I have 26 classes of 180 images per class. The dataset was split into 1/3(67%) for tanning and 2/3(33%) testing after feature ...
seyinia's user avatar
  • 23