R - ROC Curves/AUC Specificity vs 1-Specificity
up vote
0
down vote
favorite
I have created a few predictive models and I am in the process of evaluating them by looking at the ROC Curve and AUC.
Currently, I have Specificity on X axis, however, when I researched ROC Curves, I saw 1 - Specificity on the X axis.
What is the difference and which should I use to validate my predictive models?
If Specificity is on the X-Axis, do I still want to maximize the AUC (from experience the answer is yes but I want to confirm)?
Here is how I am plotting it:
> library(pROC)
> g <- roc(Setup ~ Probs, data = Data)
> plot(g)
> auc(g)
> ci.auc(g)
r data-science roc auc predictive
add a comment |
up vote
0
down vote
favorite
I have created a few predictive models and I am in the process of evaluating them by looking at the ROC Curve and AUC.
Currently, I have Specificity on X axis, however, when I researched ROC Curves, I saw 1 - Specificity on the X axis.
What is the difference and which should I use to validate my predictive models?
If Specificity is on the X-Axis, do I still want to maximize the AUC (from experience the answer is yes but I want to confirm)?
Here is how I am plotting it:
> library(pROC)
> g <- roc(Setup ~ Probs, data = Data)
> plot(g)
> auc(g)
> ci.auc(g)
r data-science roc auc predictive
Does your ROC curve move towards the top-left corner with better performance? That's the convention. If you have specificity on the x-axis I guess the top-right corner would show better performance, but the area under the curve should be equal either way.
– Marius
Nov 21 at 23:58
@Marius I added an image of the RUC Curve. The curve moves towards the top right corner but the "peaks" approaches the top left (if that makes any sense).
– MhQ-6
Nov 22 at 0:05
In other words, it looks like any other ROC graph that I found on google, where the curve starts at the bottom left and moves towards the top right and the peaks extends towards the top left. Literally like any ROC curve you will find using google, only difference is, I have specificity on the x axis. All the ones I found on google have 1-Specificity. Not sure what to make of it.
– MhQ-6
Nov 22 at 0:07
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have created a few predictive models and I am in the process of evaluating them by looking at the ROC Curve and AUC.
Currently, I have Specificity on X axis, however, when I researched ROC Curves, I saw 1 - Specificity on the X axis.
What is the difference and which should I use to validate my predictive models?
If Specificity is on the X-Axis, do I still want to maximize the AUC (from experience the answer is yes but I want to confirm)?
Here is how I am plotting it:
> library(pROC)
> g <- roc(Setup ~ Probs, data = Data)
> plot(g)
> auc(g)
> ci.auc(g)
r data-science roc auc predictive
I have created a few predictive models and I am in the process of evaluating them by looking at the ROC Curve and AUC.
Currently, I have Specificity on X axis, however, when I researched ROC Curves, I saw 1 - Specificity on the X axis.
What is the difference and which should I use to validate my predictive models?
If Specificity is on the X-Axis, do I still want to maximize the AUC (from experience the answer is yes but I want to confirm)?
Here is how I am plotting it:
> library(pROC)
> g <- roc(Setup ~ Probs, data = Data)
> plot(g)
> auc(g)
> ci.auc(g)
r data-science roc auc predictive
r data-science roc auc predictive
edited Nov 22 at 0:04
asked Nov 21 at 23:54
MhQ-6
255
255
Does your ROC curve move towards the top-left corner with better performance? That's the convention. If you have specificity on the x-axis I guess the top-right corner would show better performance, but the area under the curve should be equal either way.
– Marius
Nov 21 at 23:58
@Marius I added an image of the RUC Curve. The curve moves towards the top right corner but the "peaks" approaches the top left (if that makes any sense).
– MhQ-6
Nov 22 at 0:05
In other words, it looks like any other ROC graph that I found on google, where the curve starts at the bottom left and moves towards the top right and the peaks extends towards the top left. Literally like any ROC curve you will find using google, only difference is, I have specificity on the x axis. All the ones I found on google have 1-Specificity. Not sure what to make of it.
– MhQ-6
Nov 22 at 0:07
add a comment |
Does your ROC curve move towards the top-left corner with better performance? That's the convention. If you have specificity on the x-axis I guess the top-right corner would show better performance, but the area under the curve should be equal either way.
– Marius
Nov 21 at 23:58
@Marius I added an image of the RUC Curve. The curve moves towards the top right corner but the "peaks" approaches the top left (if that makes any sense).
– MhQ-6
Nov 22 at 0:05
In other words, it looks like any other ROC graph that I found on google, where the curve starts at the bottom left and moves towards the top right and the peaks extends towards the top left. Literally like any ROC curve you will find using google, only difference is, I have specificity on the x axis. All the ones I found on google have 1-Specificity. Not sure what to make of it.
– MhQ-6
Nov 22 at 0:07
Does your ROC curve move towards the top-left corner with better performance? That's the convention. If you have specificity on the x-axis I guess the top-right corner would show better performance, but the area under the curve should be equal either way.
– Marius
Nov 21 at 23:58
Does your ROC curve move towards the top-left corner with better performance? That's the convention. If you have specificity on the x-axis I guess the top-right corner would show better performance, but the area under the curve should be equal either way.
– Marius
Nov 21 at 23:58
@Marius I added an image of the RUC Curve. The curve moves towards the top right corner but the "peaks" approaches the top left (if that makes any sense).
– MhQ-6
Nov 22 at 0:05
@Marius I added an image of the RUC Curve. The curve moves towards the top right corner but the "peaks" approaches the top left (if that makes any sense).
– MhQ-6
Nov 22 at 0:05
In other words, it looks like any other ROC graph that I found on google, where the curve starts at the bottom left and moves towards the top right and the peaks extends towards the top left. Literally like any ROC curve you will find using google, only difference is, I have specificity on the x axis. All the ones I found on google have 1-Specificity. Not sure what to make of it.
– MhQ-6
Nov 22 at 0:07
In other words, it looks like any other ROC graph that I found on google, where the curve starts at the bottom left and moves towards the top right and the peaks extends towards the top left. Literally like any ROC curve you will find using google, only difference is, I have specificity on the x axis. All the ones I found on google have 1-Specificity. Not sure what to make of it.
– MhQ-6
Nov 22 at 0:07
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
This is purely a labeling problem: note that the x axis goes decreasing from 1 to 0, which is exactly the same as plotting 1-specificity on an x axis increasing from 0 to 1.
I assume you are using the pROC package. This behavior is documented in the FAQ and you can set the legacy.axes
argument to TRUE to change the behavior if the default one bothers you.
plot(g, legacy.axes = TRUE)
Thank you for the response!
– MhQ-6
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
This is purely a labeling problem: note that the x axis goes decreasing from 1 to 0, which is exactly the same as plotting 1-specificity on an x axis increasing from 0 to 1.
I assume you are using the pROC package. This behavior is documented in the FAQ and you can set the legacy.axes
argument to TRUE to change the behavior if the default one bothers you.
plot(g, legacy.axes = TRUE)
Thank you for the response!
– MhQ-6
2 days ago
add a comment |
up vote
1
down vote
accepted
This is purely a labeling problem: note that the x axis goes decreasing from 1 to 0, which is exactly the same as plotting 1-specificity on an x axis increasing from 0 to 1.
I assume you are using the pROC package. This behavior is documented in the FAQ and you can set the legacy.axes
argument to TRUE to change the behavior if the default one bothers you.
plot(g, legacy.axes = TRUE)
Thank you for the response!
– MhQ-6
2 days ago
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
This is purely a labeling problem: note that the x axis goes decreasing from 1 to 0, which is exactly the same as plotting 1-specificity on an x axis increasing from 0 to 1.
I assume you are using the pROC package. This behavior is documented in the FAQ and you can set the legacy.axes
argument to TRUE to change the behavior if the default one bothers you.
plot(g, legacy.axes = TRUE)
This is purely a labeling problem: note that the x axis goes decreasing from 1 to 0, which is exactly the same as plotting 1-specificity on an x axis increasing from 0 to 1.
I assume you are using the pROC package. This behavior is documented in the FAQ and you can set the legacy.axes
argument to TRUE to change the behavior if the default one bothers you.
plot(g, legacy.axes = TRUE)
answered Nov 22 at 7:57
Calimo
4,20722248
4,20722248
Thank you for the response!
– MhQ-6
2 days ago
add a comment |
Thank you for the response!
– MhQ-6
2 days ago
Thank you for the response!
– MhQ-6
2 days ago
Thank you for the response!
– MhQ-6
2 days ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422077%2fr-roc-curves-auc-specificity-vs-1-specificity%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does your ROC curve move towards the top-left corner with better performance? That's the convention. If you have specificity on the x-axis I guess the top-right corner would show better performance, but the area under the curve should be equal either way.
– Marius
Nov 21 at 23:58
@Marius I added an image of the RUC Curve. The curve moves towards the top right corner but the "peaks" approaches the top left (if that makes any sense).
– MhQ-6
Nov 22 at 0:05
In other words, it looks like any other ROC graph that I found on google, where the curve starts at the bottom left and moves towards the top right and the peaks extends towards the top left. Literally like any ROC curve you will find using google, only difference is, I have specificity on the x axis. All the ones I found on google have 1-Specificity. Not sure what to make of it.
– MhQ-6
Nov 22 at 0:07