Questions tagged [proc-r-package]
pROC is an R package for ROC curves.
53
questions
6
votes
2answers
6k views
Get optimal threshold with at least 75% sensitivity with pROC in R
I have a dataframe with two columns : score1 which is numeric and truth1 which is boolean.
I want to predict truth1 using score1. To do that, I want a simple linear model, and then ask for a good ...
4
votes
3answers
11k views
How to deal with multiple class ROC analysis in R (pROC package)?
When I use multiclass.roc function in R (pROC package), for instance, I trained a data set by random forest, here is my code:
# randomForest & pROC packages should be installed:
# install....
4
votes
3answers
1k views
pROC ROC curves remove empty space
I want to draw ROC curves with pRoC.
However for some reason there is extra empty space on either side of the x-axis and I cannot remove it with xlim. Some example code:
library(pROC)
n = c(4, 3, 5)
...
4
votes
2answers
4k views
pROC - changing scale of the ROC chart
I am using the following code to plot the ROC curve after having run the logistic regression.
fit1 <- glm(formula=GB160M3~Behvscore, data=eflscr,family="binomial", na.action = na.exclude)
prob1=...
4
votes
1answer
2k views
What does coercing the “direction” argument input in roc function (package pROC in R) do exactly?
I want to create a roc object by using the function 'roc' of pROC package in R, and plot the roc object. However, I am uncertain what the 'direction' argument does. the median predictor values of my ...
4
votes
1answer
669 views
faced_wrap plot with pROC package in R (several variables)
I have three independent variable and a single binary outcome variable. I'm using pROC package for the analysis and would like to present all three ROC plots next to each other, similar to face_wrap ...
3
votes
1answer
17k views
ROCR error: Format of predictions is invalid
After getting my predictions from glmnet, I am trying to use "prediction" function, in "ROCR" package, to get tpr, fpr, etc but get this error:
pred <- prediction(pred_glmnet_s5_3class, y)
Error ...
3
votes
1answer
826 views
Difference in average AUC computation using ROCR and pROC (R)
I am working with cross-validation data (10-fold repeated 5 times) from a SVM-RFE model generated with the caret package. I know that caret package works with pROC package when computing metrics but I ...
3
votes
1answer
233 views
How to get p value after ROC analysis with pRoc package?
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(...
3
votes
1answer
75 views
Use pROC package with h2o
I'm doing a binary classification with a GBM using the h2o package. I want to assess the predictive power of a certain variable, and if I'm correct I can do so by comparing the AUC of a model with the ...
3
votes
1answer
125 views
Change default arguments of ROC computation (pROC) in the RFE process (caret) - R
I am computing a SVM-RFE model using "ROC" as the metric, with the rfe function (caret package). To my knowledge, the rfe algorithm optimizes the AUC values using the roc function of the pROC package, ...
3
votes
1answer
658 views
CI of PPV and NPV using pROC
I've been using the pROC package in R to generate bootstrapped confidence intervals for SP and SN values corresponding to specific thresholds. However, I've been unable to find a way to generate CI's ...
3
votes
1answer
2k views
R multiclass/multinomial classification ROC using multiclass.roc (Package āpROCā)
I am having difficulties understanding how the multiclass.roc parameters should look like.
Here a snapshot of my data:
> head(testing.logist$cut.rank)
[1] 3 3 3 3 1 3
Levels: 1 2 3
> head(mnm....
2
votes
2answers
5k views
ROC function error “Predictor must be numeric or ordered.”
I am not able to get ROC function to work, I get the error "Predictor must be numeric or ordered".
I've looked through other posts, but nothing solves my problem. Any help is highly appreciated.
"...
2
votes
1answer
12k views
How can I draw a ROC curve for a randomForest model with three classes in R?
I'm using the R package, randomForest, to create a model that classifies into three groups.
model = randomForest(formula = condition ~ ., data = train, ntree = 2000,
...