# 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.

91 questions
Filter by
Sorted by
Tagged with
133 views

### Confusion Matrix

Here is my question in my assignment: You have built a classification model with 90% accuracy but your client is not happy because False Positive rate was very high then what will you do? This ...
161 views

### How to decide optimal threshold for my classification model from FPR, TPR and threshold

I am building my model in Python to classify customer in buyer/ non-buyer category. I used mutiple agorithms for this problem and then after evaluation selecting the best out of all. sklearn package ...
490 views

### Confusion Matrixs for Binary classifier

I am new to modeling, and I am practicing building a logistic regression model. I would like to create a confusion matrix, but my code doesn't seem to work. Here is the code for the model (which ...
178 views

### How to best estimate the coefficients of a confusion matrix in case of strong class imbalance?

I have a trained binary classifier (forget about how this was trained and think of it as a magical black box) and I would like to measure its classification performance (e.g. compute a confusion ...
583 views

### Is it possible to find a model that minimises both false positive and false negative?

Is it possible to come up with a model that minimises both false positive and false negative? Minimising can be done to a point, such as the Bayes error threshold.
3k views

### Using scikit Learn - Neural network to produce ROC Curves

I want to verify that the logic of the way I am producing ROC curves is correct. (irrelevant of the technical understanding of the actual code). I have a data set which I want to classify. I am using ...
4k views

### The Area Under an ROC Curve (AUC) vs Confusion Matrix for classifier evaluation?

When should I use The Area Under an ROC Curve (AUC) or the Confusion Matrix for classifier evaluation? The clasifier evaluation is for example the prediction of customers for possible future sales.
986 views

### Confusion Matrix of LSTM using Sklear getting error

I want to calculate the confusion Matrix of my LSTM model. Shape of y_test= (17799,1) y_Pred= (17799,1) I used thefollowing code:from sklearn.metrics import confusion_matrix cm = confusion_matrix(...
419 views

### How to make sense of confusion matrix

Consider a binary classification problem with 0 labels denoting normal and 1 abnormal or rare. The number of instances with <...
3k views

### Precision and Recall if not binary

I have to calculate precision and recall for a university project to measure the quality of the classification output (with sklearn). Say this would be my results: y_true = [0, 1, 2, 1, 1] y_pred = [...
286 views

### How to quantify the performance of the classifier (multi-class SVM) using the test data?

I am working on a traffic sign recognition code in MATLAB using Belgian Traffic Sign Dataset. The dataset consists of training data and test data. I resized the given images and extracted HOG ...
693 views

...
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 ...
1k views

### Interpreting confusion matrix and validation results in convolutional networks

I need some help in the assessment of the training results of a convolutional neural network. Here is my setup: Architecture: InceptionV3 Pre-trained InceptionV3 with weights from image net ...
22k views

### Confusion Matrix - Get Items FP/FN/TP/TN - Python

After run my python code: print(confusion_matrix(x_test, x_pred)) I get this: [100 32 211 21] My question is how can I get the following list: True positive = ...
409 views

### Matrix Confusion - Get Model Precision

I've this matrix confusion: [9779 107] [2227 148] What is the accuracy of my model? My doubt is because the confusion matrix is calculated based on Test ...
34k views

### Train Accuracy vs Test Accuracy vs Confusion matrix

After I developed my predictive model using Random Forest I get the following metrics: ...
263 views

### Export dataset with predicted target - Python

I've this code (part of predictive model): ...
845 views

### Python - Get FP/TP from Confusion Matrix using a List

I using two different classifiers to predict a binary target (Random Forests and Decision Trees). Now I want to evaluate my model creating a confusion matrix. For example, for predicting the binary ...
600 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 ...
807 views

### Dealing with unbalanced error rate in confusion matrix

Here is the confusion matrix I got when I was playing with Forest Type Cover Kaggle dataset : Link. In the matrix, light color and higher numbers represent higher error rates, so as you can see, ...
662 views

### Calculating a Confusion Matrix

Can someone help me understand how to find the values of a confusion matrix? I know that essentially a confusion matrix looks like this: ...
2k 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 ...
5k views

### How to calculate Precision and Recall using confusion matrix in Matlab?

I am working on 3 class problem.How to calculate precision,recall ,f-score,MCC of each class while using MATLAB. Here is my confusion matrix: ...
607 views

### Is this a good classified model based confusion matrix and classification report?

I build a classification model. The results below when implemented Decision Tree Classifier. Prediction accuracy 0.785813630042 confusion matrix [[ 1302 1581] [ 2577 13953]] ...
6k views

### How can I make big confusion matrices easier to read?

I have recently published a dataset (link) with 369 classes. I ran a couple of experiments on them to get a feeling for how difficult the classification task is. Usually, I like it if there are ...
301 views

### How to interpret the AUC score in this case?

I just run a random forest model on a imbalance dataset. I got the set of AUC and the confusion matrix. The AUC seemed not bad but actually the model predict every instance as positive. So how it ...
5k views

### Calculating RMSE AND R-squared from the confusion matrix

I have my confusion matrix as C.mat 8263 20 39 2 3826 14 43 7 4431 My predicted class labels are Ypred and actual labels are Ytest. Ypred ...
2k views

### Confusion matrix - classes get confused with each other

I got an example from this book on page 318: Chemometrics for Pattern Recognition By Richard G. Brereton. The example explained that; ...
52k views

### How to get predictions with predict_generator on streaming test data in Keras?

In the Keras blog on training convnets from scratch, the code shows only the network running on training and validation data. What about test data? Is the validation data the same as test data (I ...
69 views

### What do this Classification evaluation results mean to you? Do they are suspicious or not?

I have collected dataset with two class labels and used the SVM Method to classify the dataset, and this is the results. Does this appear suspicious or not? scikit-learn classifiers with SVM SVC ...
305 views

### Term for relative recall

For in calculating success in information retrieval, precision and recall are fairly standard measurements, relating to accuracy of the results, and to what extent the results are comprehensive, ...
74 views

### Performance Measures [closed]

I run the following models..Decision tree, Logistic Regression,Naive Bayes, SVM and Random Forest ..I am given certain input features and Respnse feature as whether a customer will buy the product or ...
290 views

### Understanding ConfusionMatrix for Google Prediction API

I'm trying to analyze my training model, Google Prediction API provides analyze method to get insights for the model. Currently I want to improve confidence levels, for my predictions, I haven't found ...
2k views

### Python plot for confusion matrix similar to confusion wheel?

I have a confusion matrix with 7 classes and would like to represent the matrix in a graph. Something similar like a confusion wheel. Mainly I need to show, the correct observations in each class and ...
34 views

### result of correlation function in r

I would like to ask if the matrix that is returned from the R cor() function applied on a dataset, is considered a confusion matrix. Thank you
184 views

### Multiple confusion matrix for multiple training instances. Which one to take?

I am using Matlab Neural Network toolbox for a classification problem. Now considering a single set of data, if the inbuilt neural network is trained and classified with same data multiple number of ...
46 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 ...
539 views

### How to define confusion matrix for classification?

Below is the dataset where the response variable is play with two labels (yes, and no): ...