Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfUtilities::Aucuracy(x , y) inverse #9

Open
JMFiore opened this issue Mar 6, 2023 · 1 comment
Open

rfUtilities::Aucuracy(x , y) inverse #9

JMFiore opened this issue Mar 6, 2023 · 1 comment

Comments

@JMFiore
Copy link

JMFiore commented Mar 6, 2023

The calculation of the function are done correctly, but in the documentation the functions asks for X to be the vector of predicted data and Y vector of observed data by doing that the metrics for Sensibility and Specificity are wrong. If the opposite is done, the calculations are correct. I suggest changing the description in the documentation to avoid misunderstanding.

img_metrics

@JMFiore
Copy link
Author

JMFiore commented Mar 6, 2023

observed1 <- factor(c(1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0),levels=c('1','0'))# 1x6positive , 0x10negative
predicted1<- factor(c(1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0),levels=c('1','0'))# TP=3, FN=3 , FP=2, TN=8

rfu_docum <- rfUtilities::accuracy( predicted1, observed1) ## as in documentation
rfu_Notdoc <- rfUtilities::accuracy(observed1, predicted1)
Sens_mlmetrics <- MLmetrics::Sensitivity(observed1,predicted1)
caret_confm <- caret::confusionMatrix(predicted1,observed1)
rfu_docum$sensitivity
Sens_mlmetrics
rfu_Notdoc$sensitivity

rfu_docum$confusion
caret_confm$table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant