auc Questions

3

Solved

How can I obtain the AUC value having fpr and tpr? Fpr and tpr are just 2 floats obtained from these formulas: my_fpr = fp / (fp + tn) my_tpr = tp / (tp + fn) my_roc_auc = auc(my_fpr, my_tpr) I ...
Tarragon asked 14/6, 2018 at 0:50

3

The label in my data is a (N by 1) vector. The label values are either 0 for negative samples or 1 for positive samples (so, it's a binary classification problem). I use the .fit function of sklear...
Durkee asked 26/6, 2019 at 21:50

3

Solved

I am aware of the concept of Precision as well as the concept of Recall. But I am finding it very hard to understand the idea of a 'threshold' which makes any P-R curve possible. Imagine I have a...

8

Solved

I am using an rpart classifier in R. The question is - I would want to test the trained classifier on a test data. This is fine - I can use the predict.rpart function. But I also want to calculate...
Virtuoso asked 14/12, 2011 at 4:6

3

Solved

I'm building a two class classification model using KNN I tried to calculate auc_score with from sklearn.metrics import auc auc(y_test, y_pred) --------------------------------------------------...
Toplofty asked 4/3, 2019 at 9:21

2

I have a multi-class classification problem and I want to measure AUC on training and test data. tf.keras has implemented AUC metric (tf.keras.metrics.AUC), but I'm not be able to see whether this ...
Litt asked 30/10, 2019 at 17:1

4

I have the below F1 and AUC scores for 2 different cases Model 1: Precision: 85.11 Recall: 99.04 F1: 91.55 AUC: 69.94 Model 2: Precision: 85.1 Recall: 98.73 F1: 91.41 AUC: 71.69 The main mo...
Daugavpils asked 25/5, 2017 at 4:14

2

Solved

I am trying to plot multiclass ROC curves but I have not found anything fruitful in the pROC package. Here's some start code: data(iris) library(randomForest) library(pROC) set.seed(1000) # 3-clas...
Whitver asked 9/12, 2015 at 2:29

3

What's the best way to compute AUC in SQL? Here is what I got (assuming table T(label, confid) and label=0,1): SELECT sum(cumneg * label) * 1e0 / (sum(label) * sum(1-label)) AS auc FROM ( SELE...
auc
Rusel asked 23/1, 2019 at 0:17

5

Solved

I am building 2 models. Model 1 modelgb = GradientBoostingClassifier() modelgb.fit(x_train,y_train) predsgb = modelgb.predict_proba(x_test)[:,1] metrics.roc_auc_score(y_test,predsgb, average='mac...
Erose asked 20/3, 2017 at 2:22

1

Solved

My problem I would like to build a logistic regression model with a high AUC in predicting a binary variable. I would like to use the following approach (if feasible): Use an elastic net model (gl...
Geaghan asked 14/3, 2021 at 4:34

1

Solved

I noticed that the result of the following two codes is different. #1 metrics.plot_roc_curve(classifier, X_test, y_test, ax=plt.gca()) #2 metrics.plot_roc_curve(classifier, X_test, y_test, ax=plt...
Holton asked 27/2, 2021 at 10:10

2

I have a slightly imbalanced dataset for a binary classification problem, with a positive to negative ratio of 0.6. I recently learned about the auc metric from this answer: https://stats.stackexch...
Monomer asked 10/1, 2017 at 6:44

2

Solved

I'm trying to compute the AUC score for a multiclass problem using the sklearn's roc_auc_score() function. I have prediction matrix of shape [n_samples,n_classes] and a ground truth vector of shap...
Pimento asked 9/1, 2020 at 14:27

4

Given a balanced dataset (size of both classes are the same), fitting it into an SVM model I yield a high AUC value (~0.9) but a low accuracy (~0.5). I have totally no idea why would this happen, ...
Skirling asked 15/7, 2016 at 4:33

11

Solved

Given a vector of scores and a vector of actual class labels, how do you calculate a single-number AUC metric for a binary classifier in the R language or in simple English? Page 9 of "AUC: a Bet...
Baku asked 4/2, 2011 at 21:24

5

Solved

I am doing a k-fold XV on an existing dataframe, and I need to get the AUC score. The problem is - sometimes the test data only contains 0s, and not 1s! I tried using this example, but with differ...
Metamerism asked 17/7, 2017 at 8:18

1

Solved

I have the following evaluation metrics on the test set, after running 6 models for a binary classification problem: accuracy logloss AUC 1 19% 0.45 0.54 2 67% 0.62 0.67 3 66% 0.63 0.68 4 67% 0.6...
Buzzell asked 29/10, 2019 at 15:4

2

Background I have a multi-label classification problem with 5 labels (e.g. [1 0 1 1 0]). Therefore, I want my model to improve at metrics such as fixed recall, precision-recall AUC or ROC AUC. It...
Hittite asked 21/1, 2019 at 8:56

4

Solved

This is for a function to calculate the AUC using the Midpoint Rule. Using R how can I define a vector that contains the midpoints between values of a previous vector? Or how can I shift the values...
Governance asked 31/3, 2018 at 3:31

2

Solved

I would like to know if there is a way to plot the average ROC Curve from the cross-validation data of a SVM-RFE model generated with the caret package. My results are: Recursive feature selectio...
Jokjakarta asked 13/5, 2016 at 16:46

1

Solved

I am using my test set as a validation set. I used similar approach as How to compute Receiving Operating Characteristic (ROC) and AUC in keras? The issue is that my val_auc during the training is...
Pash asked 7/9, 2018 at 19:56

4

I have fitted a SVM model and created the ROC curve with ROCR package. How can I compute the Area Under the Curve (AUC)? set.seed(1) tune.out=tune(svm ,Negative~.-Positive, data=trainSparse, kern...
Corking asked 7/1, 2017 at 16:36

1

Solved

I am trying to use the scikit-learn module to compute AUC and plot ROC curves for the output of three different classifiers to compare their performance. I am very new to this topic, and I am strug...
Bartko asked 5/11, 2015 at 15:3

1

Solved

I am trying to build a classifier with LightGBM on a very imbalanced dataset. Imbalance is in the ratio 97:3, i.e.: Class 0 0.970691 1 0.029309 Params I used and the code for training is as sho...
Walloping asked 5/7, 2018 at 12:0

© 2022 - 2025 — McMap. All rights reserved.