[Analogue-commits] r159 - in pkg: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 2 09:30:14 CET 2010
Author: gsimpson
Date: 2010-03-02 09:30:14 +0100 (Tue, 02 Mar 2010)
New Revision: 159
Modified:
pkg/R/roc.R
pkg/inst/ChangeLog
Log:
fix bug in generation of points on ROC curve where we evaluate other statistics
Modified: pkg/R/roc.R
===================================================================
--- pkg/R/roc.R 2010-01-22 19:02:48 UTC (rev 158)
+++ pkg/R/roc.R 2010-03-02 08:30:14 UTC (rev 159)
@@ -32,7 +32,8 @@
TPF <- cumsum(tab[, 2])/sum(tab[, 2])
FPE <- cumsum(tab[, 1])/sum(tab[, 1])
roc.values <- TPF - FPE
- roc.points <- rev(sort(c(IN, OUT)))
+ ##roc.points <- rev(sort(c(IN, OUT)))
+ roc.points <- rev(sort(as.numeric(dimnames(tab)[[1]])))
optimal <- as.numeric(names(max.roc <- which.max(roc.values)))
names(FPE) <- names(TPF) <- names(roc.values) <- NULL
wilcox <- wilcox.test(IN, OUT, conf.int = FALSE)
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2010-01-22 19:02:48 UTC (rev 158)
+++ pkg/inst/ChangeLog 2010-03-02 08:30:14 UTC (rev 159)
@@ -14,6 +14,11 @@
* fixUpTol: was inappropriately matching one of it's arguments.
+ * roc: In some circumstances, the generation of the points at which
+ the ROC curve was evaluated resulted in more points than the other
+ statistics. Fixed to use the points established by 'table', used to
+ generate these other statistics. This affected the plot method.
+
Version 0.6-22
* tran.formula: bug in my implementation of the standard
More information about the Analogue-commits
mailing list