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
-1
votes
1answer
23 views

Does a confusion matrix have to sum to 100% for each class?

Does my confusion matrix looks correct ?
1
vote
1answer
30 views

Adding extra (meaningful) features does not improve model performance

I am struggling with confusion matrices and their outputs. I thought to follow all the steps right, but unfortunately it seems that something is not going well. I had a dataset built and labelled on ...
0
votes
0answers
19 views

Found input variables with inconsistent numbers of samples: [30, 24]

I'm using neural network machine learning and would like to see the result of my confusion matrix for my model. However, there is an error that I've got and don't know how to solve it. ...
0
votes
0answers
41 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 ...
-1
votes
1answer
24 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 ...
1
vote
1answer
27 views

How to calculate the different metrics for multi class classification

My confusion matrix has the following structure: (Predicted) C= ( actual) [TN FP FN TP] How can I calculate the Mathews ...
1
vote
1answer
26 views

How to measure a almost (?) ordinal classification?

I have a model where I predict classes to define instructions for a trader robot. The classes are -2, -1, 1 and 2 (strong sell, light sell, light buy and strong buy) and I'm using a simple confusion ...
0
votes
0answers
5 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 ...
1
vote
0answers
30 views

Interpreting a confusion matrix [closed]

I have a binary classification problem. The accuracy score is 52% The precision for 0 is 53% and the precision for 1 is 49% When using predict_proba() does this ...
1
vote
1answer
36 views

Is there a flexible way to get the original data indices from each cell of a confusion matrix?

Let's say I have model A and model B, that I want to compare the performance of by inspecting a confusion matrix. They both produce a list of predictions, pred_A ...
0
votes
1answer
19 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 ...
0
votes
0answers
14 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 ...
2
votes
1answer
44 views

Calibrating probability thresholds for multiclass classification

I have built a network for the classification of three classes. The network consists of a CNN followed by two fully-connected layers. The CNN consists of convolutional layers, followed by batch ...
1
vote
1answer
34 views

How to improve results from ML model? (spam classification)

I am trying to build a model that predicts if an email is spam/not-spam. After building a logistic regression model, I have got the following results: ...
3
votes
1answer
85 views

Confusion matrix in sklearn

If you look at this: ...
0
votes
1answer
28 views

Same confusion matrix when changing DecisionTreeClassifier parameters

I'm trying to build my first Decision Tree Classifier using the Iris dataset in the sklearn library. This is my first sample code: ...
-1
votes
1answer
17 views
1
vote
1answer
40 views

Confusion Matrix vs AUC Confusion with Random Forest [closed]

I'm currently training a random forest classifier with 1000 trees and am receiving the following confusion matrix. I've split the training set 75/25 against the test set but am not sure why I'm ...
0
votes
1answer
28 views

Model accuracy: how to determine it?

I have some doubts regarding the approach to build a classifier such as Multinomial Naive Bayes or SVM. I will go through the steps to see if the approach is fine. I have not a lot of experience in ...
-1
votes
1answer
55 views

How to check two list (predicted and actual) having different lengths?

I got a list of fake accounts through an algorithm and I would like to determine the precision/accuracy of this result comparing it with the labelled dataset. The lists contain only fake accounts and ...
2
votes
2answers
96 views

Confusion matrix to check results

I am a new user in StackExchange and a new learner of Data Science. I am working on better understanding how to estimate the results collected, specifically fake users extracted from a dataset running ...
1
vote
0answers
68 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 ...
0
votes
0answers
13 views

What are the Objectives for Recommendation Systems and what Key Results should a Recommendation System focus on?

I know that a Recommendation system helps in the engagement of the users and helps users find more relevant content but I am in search of more complex objectives and key results with regards to ...
2
votes
2answers
121 views

Confusion matrix. “How close I am to the diagonal?”. Is there such metric?

I have a question regarding confusion matrices. To start, we discuss the case of multi-class classification so the confusion matrix has dimension, for example 4 times 4, for classification task with 4 ...
0
votes
0answers
19 views

Misclassifying only 1 of 3 classes in NN with Keras against RF

I'm working on the classification of a small dataset of clinical data. It is composed of around 3500 samples, with 15 features and there are 3 diferent classes (2 of them also have 2 subclasses each ...
1
vote
1answer
56 views

Sampling in Text Classification: can the results be considered 'reliable'?

I am testing different models (SVM, Logistic Regression, Naive Bayes, Random Forest) for predicting the class of a spam email. My target is a binary variable. I am analysing only text, no other fields....
0
votes
0answers
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 ...
1
vote
2answers
70 views

How to extract true positives data (complete row with data) after training and testing from test dataset?

How do you extract true positive data from testing data after training and testing? For example, in the test data, I have two rows and one row is true positives and the other is false negatives. ...
0
votes
0answers
41 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 ...
1
vote
1answer
25 views

Mathematics: Writing down a three-class classifier confusion matrix

Confusion matrix 2A three-class classifier is evaluated on a test set of 900 samples which containsall three classes in equal proportions. ...
5
votes
2answers
389 views

Accuracy is lower than f1-score for imbalanced data

For a binary classification, I have a dataset with 55% negative label and 45% positive labels. The results of the classifier shows that the accuracy is lower than the f1-score. Does that mean that the ...
2
votes
1answer
46 views

Getting value of 2 in normalized confusion matrix

I have created confusion matrix with python and I have gotten weird results that made me worried: as you can see, I have value of two, and if I understand correct, normalized matrix cannot have value ...
2
votes
1answer
52 views

Confusion regarding confusion matrix

I am confused on how to represent the confusion matrix -- where to put the FP and FN. Link1 and Link2 show different confusion matrix for binary classification. The rows represent the actual and ...
0
votes
1answer
30 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 ...
0
votes
1answer
97 views

Random forest confusion matrix encountered invalid values

I am doing classificaion using random forest classifier in python (scikit learn). I have many different databases, each one has 33 observations and the prediction is based on 600 columns. The script ...
0
votes
0answers
48 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
1
vote
1answer
34 views

Info obtained from a confusion matrix

I am new to data science and I am trying to understand the use/importance of accuracy, precision, recall, sensitivity and f1-score when I have a confusion matrix. I know how to compute all of them ...
0
votes
0answers
22 views

Definitive Values in Confusion Matrix

I built a convolutional LSTM model for the classification of 4-image time series. I used n keras ConvLSTM layers, followed by a time-distributed flatten and a few dense layers, finalized by a dense ...
0
votes
0answers
64 views

H2o Model Classification - Confusion Matrix Vs AUC

I am running a Classification Model in Python using H2o When I checked the model Performance on test dataset I got ...
0
votes
1answer
4k views

AxisError: axis 1 is out of bounds for array of dimension 1

I've used svm classifier. Now I need to construct the confusion matrix. Here is the code that I have used. ...
0
votes
1answer
22 views

text classification : comparing classification reports

I have a 4-leabelled text classification problem. Could someone help me choose among the below text classifiers ? I was advised to select the second one ( the one which uses both unigrams and ...
1
vote
1answer
29 views

Confusion matrix doesn't display properly

I am trying to plot a confusion matrix using the Logistic Regression for a multi-class ...
2
votes
2answers
88 views

What is the purpose of a confusion matrix in a classification problem?

I am studying machine learning. After some research I understood that a typical workflow for a classification problem (after having prepared the data) is the following: Split data in test, train and ...
0
votes
1answer
114 views

Confusion matrix of UNET image sgemenation model

I have used Unet model for image segmentation. I have used RGB images and corresponding image masks and at output i got corresponding region of interest. Now i want to find confusion matrix of this ...
8
votes
3answers
3k views

Can the F1 score be equal to zero?

As it is mentioned in the F1 score Wikipedia, 'F1 score reaches its best value at 1 (perfect precision and recall) and worst at 0'. What is the worst condition that was mentioned? Even if we ...
0
votes
0answers
41 views

Confusion Matrix for Multi task Learning using custom data generator

I am working on developing an MTL model. There are two tasks in the model, task1, and task2. And I have used a custom data generator using following code: ...
0
votes
1answer
217 views

Finding TN,FN, TP, and FN for arrays using confusion matrix

My prediction results look like this TestArray ...
1
vote
1answer
301 views

How is the weight matrix set and its dimension in CNN

I am trying to calculate the output size of each layer and the number of parameters for 3 class classification using CNN. I have calculated till the final maxpooling layer and would really appreciate ...
1
vote
1answer
143 views

Confusion matrix and ROC AUC curves are not in sync

I created a classification model with three target classes and created a confusion matrix to measure the accuracy, here is the matrix code ...
1
vote
2answers
42 views

Why ROC value area under curve of two models is different whereas accuracy, precision, recall, f1-score and confusion matrix is same

I am applying logistic regression and support vector machines on the extacly same dataset with 70% data for training and 30% for test. Both perform exactly the same have the same precision, recall, f1-...