Questions tagged [confusion-matrix]

A confusion matrix is a contingency table of correct and incorrect classifications used to evaluate the performance of a classification algorithm in machine learning.

1111 questions
-2
votes
2 answers

Which one is which ? (True Positive, True Negative, False Positive, False Negative)

I am running confusion matrix on my own custom model using Tensorflow Object Detection API. I am using Faster R-CNN Inception v2 pets. I get this output: Processed 100 images Processed 200 images Processed 300 images Processed 400 images Processed…
-2
votes
1 answer

Python confusion matrix

I have a problem with the evaluation of clusters result. I have 3 lists: # 10 objects in my corpus TOT = [1,2,3,4,5,6,7,8,9,10] # .... clustering into k=5 clusters # For each automatic cluster: # Objects with ID 2 and 8 are stored into this …
MARCO LAGALLA
  • 227
  • 5
  • 12
-2
votes
1 answer

Finding the cutoff value using confusion matrix?

n<-1 a<-as.vector(length(s)) for (i in s ) { print(i) test$result<-ifelse(test$pred>i,1,0) a[n]<-confusionMatrix(test$result,test$churn,positive = "1")$overall[2] print(n) n=n+1 } max(a) How do iget the threshold value between the…
Aditya
  • 13
  • 5
-2
votes
1 answer

How to get confusion matrix of Tensorflow hub model

I have trained a model based on transfer learning via Tensorflow Hub. I have been looking at many places for hints on producing Confusion matrix but I haven't been able to get to the right solution. Does anyone know if this is possible? The last…
-2
votes
1 answer

Confusion matrix for numerical output? - Python

I want to evaluate the performance of my model, but the problem I have is I have always used a confusion matrix because I have always done models with categorical output (classification). Now, I have this model with numerical output and I find…
Chris
  • 2,019
  • 5
  • 22
  • 67
-2
votes
1 answer

Calculate confusion matrix

I generated random data points from three bivariate Gaussian densities as follows. set1 <- rmvnorm(n = 100, mean = c(0, 1.5), sigma = matrix(c(1,.2,.2,3.2),nrow=2)) I generated three set of random data points and I need to calculate the confusion…
user7071925
-2
votes
1 answer

Plot value in unequal list/array shape using Imshow and cmap

I want to plot my values to be something like this: I have 4x12 values in a list. values = [[2.78, 2.78, 2.78, 2.79, 2.79, 2.79, 2.8, 2.8, 2.81, 2.82, 2.82, 2.77], [2.98, 2.98, 2.98, 2.99, 2.99, 2.99, 3.0, 3.0, 3.01, 3.02, 3.03, 2.98], …
Gerry Julian
  • 43
  • 2
  • 7
-2
votes
1 answer

Evaluating NaiveBayes classifier by constructing confusion matrix

I am trying to build a confusion matrix for blood Pressure patient where in actual number of patients predicted Blood pressure=0.18 and Not .82 Now the Naive Bayes classifier has Predicted no of patients having Blood pressure=0.410 and not 0.0913.I…
-3
votes
1 answer

Confusion_matrix according two indicators

y_true means correct target values; Y_pred represents the probability value returned by the classifier to estimate the target Please calculate the confusion matrix according to these two indicators. y_true = [True,False,False,True] y_pred =…
-3
votes
1 answer

Confusion Matrix ValueError: Found input variables with inconsistent numbers of samples: [3, 360]

I'm trying to train a data set and output a confusion matrix after the dataset has been trained. Here is the code import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Conv2D, Flatten,…
shiv shah
  • 77
  • 8
-3
votes
2 answers

2x2 confusion matrix in three-class classification?

I am doing classification on a dataset with three classes (Labels Low, Medium, High). I run the following code to get my confusion matrix: from sklearn.metrics import confusion_matrix cm = confusion_matrix(y_test, y_pred) And I get the following…
-3
votes
1 answer

find the misclassified data in a confusion matrix

I use this function to evaluate my model def stratified_cv(X, y, clf_class, shuffle=True, n_folds=10, **kwargs): X = X.as_matrix().astype(np.float) y = y.as_matrix().astype(np.int) y_pred = y.copy() stratified_k_fold =…
Ibrahima Khalil
  • 121
  • 1
  • 12
-3
votes
2 answers

How to create a confusion matrix without any packages

How do I create a confusion matrix without any packages? I want to be able to see the logic of creating one. This can be any language or pseudo-code.
-4
votes
1 answer

What does the confusion_matrix line of code do?

from sklearn.pipeline import Pipeline model = Pipeline([('vectorizer',tvec),('classifier',clf2)]) model.fit(IV_train, DV_train) from sklearn.metrics import confusion_matrix predictions = model.predict(IV_test) confusion_matrix(predictions,…
-4
votes
1 answer

Is this confusion matrix correct?

I'm trying to classify animal sounds. I'm using CNN for this purpose. I'm comparing the classes with each other, hence, some training will be done with 2 classes. Once I get the confusion matrix with these training, I encounter something like…
1 2 3
74
75