I used the dataset cars as an example
library("MLmetrics") library("PRROC") data(cars) logreg <- glm(formula = vs ~ hp + wt, family = binomial(link = "logit"), data = mtcars)
The prauc returned by PRAUC is 0.861
PRAUC(y_pred = logreg$fitted.values, y_true = mtcars$vs)
However, the prauc returned by pr.curve is 0.932
pr.curve(scores.class0 = logreg$fitted.values, weights.class0 = mtcars$vs)
Is there anything wrong?