Questions tagged [precision-recall]

Precision and Recall are statistical measures of performance for information retrieval algorithms based on binary classification. Precision is a measure of the percent of all classifications (items retrieved) that are relevant. Recall is a measure of the percent of relevant classifications (items retrieved) successfully found by the algorithm, relative to all relevant items that exist and could have been found.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Why is the accuracy of average="micro" the same as precision or recall in multi-class classification?

I have been studying multi-class classification metrics. In the process, I discovered that in the case of the parameter average='micro', accuracy, precision, recall, and the f-1 score are all the same....
MinjeSeok's user avatar
0 votes
0 answers
64 views

Computing precision/recall for a one-class detector

I think I am making myself really confused with the generation of precision and recall curves. Ultimately the purpose is to get an idea of the quality of my detection network, taking into account ...
Mr Squid's user avatar
  • 1,246
0 votes
0 answers
24 views

How to calculate macro, weighted Precision Recall values in tensorflow?

I am trying to get macro and weighted precision, recall values while training ResNet/ResNeXt models. How I compile my model: f1 =tfa.metrics.F1Score(num_classes=2, average='weighted') model.compile ( ...
javeqx's user avatar
  • 21
3 votes
2 answers
248 views

Average precision implementation for object detection - low confidence detections do not impact the score

I have the following code that calculates precision-recall curve for object detection task, where detections are matched to ground-truth first by creating 1-to-1 pairs starting from detection with the ...
Kuba_'s user avatar
  • 815
0 votes
0 answers
15 views

ROC curve for detection and classification task, what to do with missed ground truths?

I have trained faster r-cnn model to predict multiple objects per image and classify them to two classes (binary classification). However occasionally the model completely misses some ground truths. I ...
pyrkke's user avatar
  • 1
0 votes
0 answers
55 views

Binary Image classification with CNN, but Precision-Recall-F1 Score is 0 for one class

I am trying to classify if a given image is a woodpile or not. So my classes are wood and none_wood. None_wood class contains different photos including documents, numbers, persons etc. My train set ...
Harun Harman's user avatar
0 votes
0 answers
72 views

The precision and recall generated from the ROUGE score

I calculated precision and recall from the F1-score, specifically for the ROUGE-1 metric. The ROUGE score is an evaluation metric that compares the generated summary to a reference summary to ...
Saloni Sharma's user avatar
0 votes
1 answer
28 views

Getting different values from manual precision calc and scikit-learn version

Getting different values from manual precision calc and scikit-learn version from sklearn.metrics import classification_report, precision_score y_true2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, ...
user21208477's user avatar
0 votes
2 answers
51 views

Obtain F1score, Recall, Confusion Matrix and precison

How can I obtain F1score, Recall, Confusion Matrix and precison in this code.I have used compile and obtained accuracy but i dont know how write the code to obtain these metrics from my model.I would ...
Ariaeimehr's user avatar
0 votes
0 answers
43 views

tf recall precision not working for class_id 0

So, I am quite puzzled. I have the following arrays: import tensorflow as tf import numpy as np y_true = np.array( [1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, ...
J Agustin Barrachina's user avatar
0 votes
0 answers
108 views

ValueError: Target is multiclass but average='binary' error for binary data

I encountered an issue when using the recall_score() function from scikit-learn in a binary classification scenario. Despite having binary target data (y_test containing only 0s and 1s), I received ...
eszfgefr rgrer's user avatar
0 votes
1 answer
78 views

Accuracy, Precision and Recall are exactly the same during training

I am training a Binary classification model with Tensorflow 2.8. I pass the following metrics: ['accuracy', tf.keras.metrics.Precision(), tf.keras.metrics.Recall()] but on every epoch accuracy, ...
Thanos's user avatar
  • 89
0 votes
0 answers
86 views

How to get PR Curve in Object Detection API (Tensorflow)?

Currently, I have a single object detection model trained for 1 class with a mAP score of 0.87, I trained it using the model_main_tf2.py script provided in TensorFlow. Now I'm having a hard time ...
Andrés Sanhueza's user avatar
0 votes
0 answers
664 views

How to manually plot confusion matrix with YOLOv8 with Python

I am currently working with Ultralytics - YOLOv8 model. I want to calculate the confusion matrix manually, not using val.py module. Hence, I wrote the code: import os import torch from PIL import ...
Baro's user avatar
  • 1
0 votes
0 answers
88 views

How to evaluate a .pb model (for object detection) created with TensorFlow API?

I can't figure out how I can evaluate error metrics for the model I have already trained, taking advantage of protbuf and the tensorflow API. The main problem is that the model is saved as .pb but in ...
ashfu96's user avatar
0 votes
0 answers
21 views

What is the used method that calculate "F-measure" ? Micro or Macro?

In Weka experimenter, what is the used method that calculate "F-measure" ? Micro or Macro? How to calculate from the results of precision and recall in file destination (csv)?
CSSCTube FCITube's user avatar
0 votes
0 answers
24 views

Precision-Recall curve for multiple target scores

AWS Rekognition CompareFaces API return the response like this: { "FaceMatches": [ { "Face": { ... "Confidence": number, ...
Snow Kakadu's user avatar
0 votes
0 answers
111 views

how to find optimal threshold from ROC when returned threshold value is smaller than P/R length?

i'm trying to plot a precision recall and threshold graph. Below is a sample copied from another user in stackoverflow. My main goal is to find the optimal threshold value. I know there are alot of ...
Jerru's user avatar
  • 99
1 vote
0 answers
139 views

Google colab notebook - Model Maker library Custom object detection - EfficientDet architectur- Tensorflow - How to plot loss graph after training

I am trying to plot graphs in order to present model. I am using Tensorflow, colab notebook, EfficientDet architecture, model maker library , custom object detection using transfer learning, Pascal ...
Kubra Akgun's user avatar
0 votes
1 answer
190 views

Accuracy metrics for Azure cognitive search

We are planning to use the semantic search feature for processing a natural language query and surface relevant results Given that precision and recall are standard metrics for measuring ML/search ...
Srinath S's user avatar
0 votes
1 answer
144 views

Random_state for loop

I am looking to create a for loop in Python that selects a random_state number that returns the highest recall coefficient in a classification report. Below is the code I tried. import pandas as pd ...
matth's user avatar
  • 1
1 vote
1 answer
2k views

How to evaluate the quality of PCA returned by torch.pca_lowrank()?

I use the following piece of code: U, S, V = torch.pca_lowrank(A, q=self.n_components) self.V = V self.projection = torch.matmul(A, V) How to compute the cumulative percent variance or any other ...
Serge Rogatch's user avatar
0 votes
0 answers
174 views

How to get F1 score from PyTorch finetuning TorchVision model

I don't know how to extract precision and recall from the TorchVision model found at https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html#model-training-and-validation-...
Tim Osmond's user avatar
0 votes
1 answer
200 views

I can choose best model based in value of AUC PR-curve instead f1-score?

I want to argue my choice of best model obtained, however there is one model that has a higher f1-score value than another (by very little). But, when graphically visualizing the test results, the ...
Paule's user avatar
  • 25
1 vote
1 answer
253 views

How to get the Confusion matrix, Precision, Recall, F1 score, ROC curve, and AUC graph?

I built and trained the CNN Model but didn't know how to get the Confusion matrix, Precision, Recall, F1 score, ROC curve, and AUC graph. I'm not splitting the dataset by sklearn. Manually Split ...
Saravanan_Cj's user avatar
0 votes
0 answers
40 views

zero f1-score,precision and recall in one of the classe

I am working on a 5-class classification problem and the result of the benchmark by classes for the test data is as follows: As you can see, zero value has been obtained for the third class. The ...
s.pakdel's user avatar
0 votes
0 answers
44 views

word2vec based Recommendation System

In my data set ratings are not given so how can I find out the hit rate and other accuracy metrics for word2vec based recommendation system? I want to know more about the performance evaluation of ...
Mayur Laxmanrao's user avatar
1 vote
1 answer
39 views

Is it possible for both recall and precision to be zeros?

I am trying to evaluate the model performance but I get zeros in one class for both precision and recall (the data is imbalanced with multiple classes > 20 class) so , Is it possible for both ...
Asmaa Mansour's user avatar
0 votes
0 answers
57 views

mAP is giving 'nan' for all epochs during training ssd model

I am trying to train an ssd300 model on a custom dataset, I am using a custom mAP function for the evaluation but I am getting 'nan' for mAP values at each epoch Epoch [6/5], Validation Loss: 5.7220, ...
Raouf Amrani's user avatar
0 votes
0 answers
40 views

How to make tuning of hyperparameters using Hyperopt for XGBoost in Python multiclass classification to maximize Recall?

I have one simple question: How to make tuning of hyperparameters using Hyperopt in Python Xgboost to maximize recall on test dataset for multiclass classification problem? I do not see any examples ...
dingaro's user avatar
  • 2,292
-1 votes
1 answer
22 views

Scikit_learn precision and recall computed incorectly

I have unbelievably stupid problem. Calculating precision and recall by sci-kit learn gives me crazy values, totally different than calculated by me, using confusion matrix. Here's my code: I tries ...
Natalia Ziemba-Jankowska's user avatar
1 vote
0 answers
139 views

Minority class precision, recall, fscore all become zero with MLP classifier

I trained my model with MLP classifier which is available on SkLearn. I split the data using the code X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, stratify=y, random_state=...
Encipher's user avatar
  • 1,384
0 votes
0 answers
41 views

See Average-Precision and Average-Recall for multiple IoU

I have trained an object-detection model in Tensorflow 2 with EfficientDet. And now I am trying to evaluate the model performance on test dataset. I ran below command to evaluate model - python ...
Tanvir Hossain Bhuiyan's user avatar
0 votes
1 answer
376 views

High ROC-AUC and recall, but low precision and accuracy in balanced dataset

I'm using titanic dataset so it's pretty balanced (about 60:40) and the GaussianNB model (standard parameters) has accuracy of 0.659. When I plotted F1, precision and recall I discovered the reason ...
janpowaga's user avatar
0 votes
0 answers
25 views

GridSearchCV is serching for best recall for wrong value

So i work on diabetics dataset. I want to have the "best" recall i can get (classify most of diabetics as diabetics) The problem is that while my code is serching for a best recall i feel ...
Socka's user avatar
  • 37
0 votes
1 answer
34 views

How can I specify all metrics I need when compiling a model?

I have the following line of code on my model model.compile(loss='mean_squared_error', optimizer='adam', metrics=['accuracy']) Which works perfectly and shows the accuracy after each epoch. Now, my ...
Adria de Juan's user avatar
0 votes
1 answer
326 views

Confusion matrix 5x5 formula for finding accuracy, precision, recall ,and f1-score

im try to study confusion matrix. i know about 2x2 confusion matrix but i still don't understand how to count 5x5 confusion matrix for finding accuracy, precision, recall and, f1 - score. Can anyone ...
fera fani's user avatar
1 vote
1 answer
126 views

Computing Precision and Recall after training a model

I have trained/fine-tuned a few Keras models and during that, I used 'accuracy' as the only metric to calculate. now after training everything which took a long time, I realized I need precision and ...
Maral's user avatar
  • 75
-1 votes
1 answer
53 views

Why is there no name for the precision of the negative class in the assessment of a binary classifer?

In the assessment of a binary classifier, we know that specificity is the recall of the negative class. So there are clear names for both flavors of recall. Then looking at precision, I can't help but ...
tumultous_rooster's user avatar
0 votes
1 answer
484 views

How to compute precision,recall and f1 score of an balanced logistic regression model in python

i need my precision,recall and f1 score results to be like the output below precision 0.98 recall 0.98 f1 score 0.93 the numbers are just an example here is my data head here is my code ...
kjnk's user avatar
  • 19
0 votes
2 answers
228 views

Why is the spaCy Scorer returning None for the entity scores but the model is extracting entities?

I am really confused why the Scorer.score is returning ents_p, ents_r, and ents_f as None for the below example. I am seeing something every similar with my own custom model and want to understand why ...
scarpacci's user avatar
  • 9,037
0 votes
1 answer
271 views

Why not look at the precision and recall of both classes combined in a classification report?

I was looking at the classification report from sklearn. I am wondering, why did they omit a potential third row with precision and recall values for both classes together? Why were they split apart, ...
tumultous_rooster's user avatar
0 votes
0 answers
25 views

i have a simple error when presenting precision recall and F1score of a logestic regression model

hi i want my results to be presented as i single number like the output below for example Precision 0.94 Recall 0.93 F1 score 0.93 these are my data data.head() the variables with series ...
kjnk's user avatar
  • 19
0 votes
0 answers
126 views

PR curve is strange

I use tab transformer network to classify a binary imbalanced dataset, after getting the probabilities, I plot the ROC and PR curve using scikit-learn, and get the figure like this. The ROC looks ...
user18391472's user avatar
0 votes
0 answers
14 views

Is there any meaning to measure ture negative over all negative response?

When we want to assess the quality of a positive prediction made by the model, which is the number of true positives divided by the total number of positive predictions. Also, the recall shows the ...
Rainbow's user avatar
  • 191
0 votes
0 answers
48 views

Sklearn recall score: what is the average parameter for and how to define it

I was in the middle of evaluating a model using recall score and noticed this one parameter "average" which can take many values. Interestingly, if I set it to "binary" I get 1.0 ...
Moudhaffer Bouallegui's user avatar
0 votes
1 answer
255 views

Calculating multilabel recall for this problem

I have a table with two columns, and the two entries of a row show that they are related: Col1 Col2 a A b B a C c A b D Here a is related to A, C and b to B, D and c to A, meaning the same ...
konstant's user avatar
  • 695
-1 votes
1 answer
181 views

multi-class classification with f1 score equal to 1

I'm dealing with a multi-class classification, and at the end, for some of the labels, the F1 score and precision and recall are 1 . Is It normal? I thought it was odd and searched it out, but the ...
atena karimi's user avatar
0 votes
1 answer
672 views

Calculating precision, recall and F1 score per class in a multilabel classification problem

I'm trying to calculate the precision, the recall and the F1-Score per class in my multilabel classification problem. However, I think I'm doing something wrong, because I am getting really high ...
ignacioct's user avatar
  • 335
0 votes
1 answer
317 views

How to find true positive rate and false positive rate to plot ROC curve?

How to draw a ROC curse using "matplotlib.pyplot". Its x-axis is "False Positive Rate", and y-axis is "True Positive Rate". I have recall and precison with me. I know ...
Harishma Ashok's user avatar

1
2 3 4 5
9