roc Questions
8
Solved
I am trying to plot a Receiver Operating Characteristics (ROC) curve with cross validation, following the example provided in sklearn's documentation. However, the following import gives an ImportE...
Salvo asked 20/2, 2020 at 13:44
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
18
I am trying to plot a ROC curve to evaluate the accuracy of a prediction model I developed in Python using logistic regression packages. I have computed the true positive rate as well as the false ...
Udella asked 29/7, 2014 at 6:20
1
I have a plot generated using Matplotlib (it is a precision-recall curve of a histogram originally) and I need to compute the correct x value which corresponds to the y value with y = 0.9. The data...
Peking asked 3/3, 2020 at 17:4
5
Solved
I have some models, using ROCR package on a vector of the predicted class percentages, I have a performance object. Plotting the performance object with the specifications "tpr", "fpr" gives me a R...
2
Solved
This is my code and I try to calculate ROC score but I have a problem with ValueError: multiclass format is not supported. I'm already looking sci-kit learn but it doesn't help. In the end, I...
Contempt asked 9/4, 2020 at 5:27
3
Solved
I was trying to plot ROC curve with classifiers other than svm.SVC which is provided in the documentation. My code works good for svm.SVC; however, after I switched to KNeighborsClassifier, Multino...
Reverent asked 17/7, 2018 at 9:42
4
Solved
I'm doing different text classification experiments. Now I need to calculate the AUC-ROC for each task. For the binary classifications, I already made it work with this code:
scaler = StandardScal...
Biotite asked 26/7, 2017 at 16:16
5
Solved
I ran a logistic regression model and made predictions of the logit values. I used this to get the points on the ROC curve:
from sklearn import metrics
fpr, tpr, thresholds = metrics.roc_curve(Y...
Ridinger asked 25/2, 2015 at 12:28
1
Solved
I am trying to use the sklearn function RocCurveDisplay.from_predictions as presented in https://scikit-learn.org/stable/modules/generated/sklearn.metrics.RocCurveDisplay.html#sklearn.metrics.RocCu...
Jeanajeanbaptiste asked 4/10, 2021 at 8:28
4
Solved
I'm trying to plot a ROC curve using seaborn (python).
With matplotlib I simply use the function plot:
plt.plot(one_minus_specificity, sensitivity, 'bs--')
where one_minus_specificity and sensit...
Robbyrobbyn asked 26/6, 2015 at 9:8
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...
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...
2
I'm trying to understand and plot TPR/FPR for different types of classifiers. I'm using kNN, NaiveBayes and Decision Trees in R. With kNN I'm doing the following:
clnum <- as.vector(diabetes.tra...
Ofori asked 17/12, 2015 at 12:51
1
Solved
I would like to calculate the 10-fold cross-validated AUC of an elastic net regression model with the optimal alpha and lambda using caret::train
https://stats.stackexchange.com/questions/69638/doe...
Adulterer asked 20/1, 2021 at 17:38
1
Solved
After ROC analysis of a set of data, how to calculate p-value? With the same statistics, I saw that the p-value can be output in SPSS.
The sample code is as follows:
library(pROC)
data(aSAH)
head...
Loreanloredana asked 25/5, 2020 at 7:12
4
Solved
My apologies if I'm missing something obvious. I've been thoroughly enjoying working with h2o in the last few days using R interface. I would like to evaluate my model, say a random forest, by plot...
4
Solved
TLDR: scikit's roc_curve function is only returning 3 points for a certain dataset.
Why could this be, and how do we control how many points to get back?
I'm trying to draw a ROC curve, but consi...
Obsolesce asked 5/5, 2015 at 11:7
1
The ROCR library in R offer the ability to plot an average ROC curve (right from the ROCR reference manual):
library(ROCR)
library(ROCR)
data(ROCR.xval)
# plot ROC curves for several cross-validat...
1
Solved
I am trying to understand how to make a confusion matrix and ROC curve for my multilabel classification problem. I am building a neural network.
Here are my classes:
mlb = MultiLabelBinarizer()
oh...
Kingly asked 25/3, 2020 at 21:7
2
R's ROCR package provides options for ROC curve plotting that will color code and label threshold values along the curve:
The closest I can get with Python is something like
from sklearn.metric...
Chicanery asked 19/3, 2014 at 21:12
2
Solved
I have used caret package's train function with 10-fold cross validation. I also have got class probabilities for predicted classes by setting classProbs = TRUE in trControl, as follows:
myTrainin...
Warton asked 21/5, 2015 at 6:30
3
Solved
Using the R package caret, how can I generate a ROC curve based on the cross-validation results of the train() function?
Say, I do the following:
data(Sonar)
ctrl <- trainControl(method="cv", ...
1
tried grid.cv_results_ didnt correct problem
from sklearn.model_selection
import GridSearchCV
params = {
'decisiontreeclassifier__max_depth': [1, 2],
'pipeline-1__clf__C': [0.001, 0.1, 100.0]
}
g...
Danidania asked 5/4, 2019 at 16:26
2
Solved
I am trying to calculate roc_auc_score, but I am getting following error.
"ValueError: Data is not binary and pos_label is not specified"
My code snippet is as follows:
import numpy as np
from ...
Travertine asked 23/8, 2013 at 10:55
1 Next >
© 2022 - 2024 — McMap. All rights reserved.