Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
38 views

Why does my precision suddenly drop to 0.5? [closed]

I am working on a binary classification problem that will classify variable stars between Heartbeat stars and ECL stars from their light curve. When I run my code, the recall increases to 1 as the ...
Astrovis's user avatar
  • 121
0 votes
0 answers
48 views

How do i validate my mask rcnn model with mAP, precision, recall and f1 if my model detects multiple objects (sometimes fake ones)

I am working on a mask rcnn model that uses rgb aerial imagery to detect two kinds of roofs. I had to adjust many pieces of the mask rcnn model to get what i want, but everything works now. I am now ...
kinggoid games's user avatar
0 votes
2 answers
134 views

How to plot precision and recall value?

I am trying to visualize the graph about the precision-recall curve This is the data frame provided: import pandas as pd import pyspark import sklearn from recommenders.utils.spark_utils import ...
Rachel Tran's user avatar
0 votes
0 answers
18 views

Need help validating custom AUPRC scorer implementation in GridSearchCV

I have the following custom scorer code that I'm using in a grid search: def custom_auprc_scorer(y_true, y_pred): pos_label = 'positive' y_true_mapped = np.where(y_true == pos_label, 1, 0) ...
Lucas F. T. Leonardo's user avatar
0 votes
0 answers
31 views

Discrepancy between Caret, Yardstick, and MLeval in R regarding precision-recall

I am attempting to plot the precision-recall curve and measure the area under the curve of a caret cross-validated train object. Simply calling the object name yields some values of what the area ...
Dobbleri's user avatar
  • 123
0 votes
0 answers
50 views

How I get precision, recall, and f1-score from nltk.naivebayesclassifier?

I have a text classification problem with 3 target variables and I'm running a separate nltk.naivebayesclassifier for each. I have a function that trains, tests, and evaluates the training and testing ...
itsanhtuanho's user avatar
-1 votes
1 answer
239 views

precision recall curve - no skill model

I am using this tutorial for the precision-recall curves and it is great: https://machinelearningmastery.com/roc-curves-and-precision-recall-curves-for-classification-in-python/ Though, I cannot ...
Vicky's user avatar
  • 41
0 votes
0 answers
17 views

How to calculate predictive performance in this search-based algorithm?

I am developing a search algorithm which looks at lines of text and identifies terms of intrest. Once completed, these terms are compared with a gold standard. Sample results look like this: enter ...
wierdly-looking's user avatar
0 votes
0 answers
33 views

How to get a single recall score for all images using Torchmetrics module

Is there a way to get a single recall score for all the images? Because when I use MeanAveragePrecision class with extended_summary=True it gives multiple values, similar to the following: 'recall': ...
colaber2's user avatar
0 votes
0 answers
274 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
183 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,266
1 vote
0 answers
83 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
  • 31
3 votes
2 answers
632 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
  • 794
0 votes
0 answers
184 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
1 answer
35 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
67 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
54 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
1 answer
406 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
1k 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
1 vote
0 answers
166 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
337 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
260 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
3k 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
1 answer
634 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
516 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
1 vote
1 answer
102 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
-1 votes
1 answer
26 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
1 answer
246 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
  • 2,222
0 votes
1 answer
667 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
1 answer
38 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
478 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
297 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
143 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
1k 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
371 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,156
0 votes
1 answer
625 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
1 answer
332 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
  • 705
-1 votes
1 answer
603 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
1k 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
  • 345
0 votes
1 answer
530 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
0 votes
1 answer
1k views

High AUC and 100% recall, but precision and F1 are low

I have an imbalanced dataset which has 43323 rows and 9 of them belong to 'failure' class, other rows belong to 'normal' class. I trained a classifier with 100% recall and 94.89% AUC for test data (0....
ERIC_STAR's user avatar
0 votes
1 answer
185 views

Precision recall curve: how to show the value at recall 1 when not all the relevant documents can be retrieved?

I am studying the precision and recall curve. Examples given by books show that although the result does not include all the relevant documents, the curve plots the recall value up to 1, thus ...
user3029507's user avatar
0 votes
1 answer
136 views

azure automl how to find best threshold in precision recall curve?

I use automl for a classification problem. I obtained the following precision recall curve: Is it possible to find the best threshold that maximizes the f-score from this curve? and how?
tammuz's user avatar
  • 407
4 votes
1 answer
3k views

Can you plot multiple precision-recall curves using PrecisionRecallDisplay?

I am trying to plot Precision Recall curve using PrecisionRecallDisplay from scikit-learn. I have model predicted values in y_pred and actual values in y_true. I can plot precision recall curve using ...
Kartoos's user avatar
  • 1,102
0 votes
1 answer
265 views

Fastai / Pytorch - how to get Precision-Recall matrix for multiclass classification

I have a baseline image classifier which is highly inaccurate due to a huge class imbalance. Now I need to merge some small classes into bigger ones. In order to choose which classes to merge together,...
Dushamishkin's user avatar
1 vote
1 answer
227 views

How can i measure precision with this example?

How can I calculated precision . I have the total corpus contains 4000 different sentences. If I did semantic search and got 4 sentences are relevant and one is not relevant which k=5. How can I ...
user20133451's user avatar
0 votes
2 answers
138 views

How can I reduce lines of code and make it work with other data?

I have multi-classes like this: predicted = [1 0 2 1 1 0 1 2 1 2 2 0 0 0 0 2 2 1 1 1 0 1 0 1 2 1 1 2 0 0] actual = [1 0 2 1 1 0 1 2 1 1 2 0 0 0 0 1 2 1 1 2 0 2 0 2 2 2 2 2 0 0] And I want to find ...
Khatcha Reunlek's user avatar
1 vote
1 answer
2k views

Precision,recall, F1 score with Sklearn on Pytorch

I've been looking through samples but am unable to understand how to integrate the precision, recall and f1 metrics for my model. My code is as follows: for epoch in range(num_epochs): #Calculate ...
aaron's user avatar
  • 23
2 votes
1 answer
147 views

Does following code give recall for multiclass classification in Keras?

Does following code give recall for multiclass classification in Keras? even though I am not passing y_true and y_pred while calling recall function in model.compile, it showed me result of the recall....
Sheetal Nagar's user avatar
0 votes
1 answer
98 views

How can I calculate recall and precision if I have 4 x and y values in two dataset?

I have two dataset(ground truth and predicted) and both have xmin, ymin,xmax and ymax values. I found some source codes but they are only for x and y values not 4 values. You can find the source code ...
user avatar

1
2 3 4 5
9