[Analogue-commits] r386 - in pkg: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 9 06:37:21 CEST 2013
Author: gsimpson
Date: 2013-10-09 06:37:21 +0200 (Wed, 09 Oct 2013)
New Revision: 386
Modified:
pkg/R/crossval.pcr.R
pkg/inst/ChangeLog
Log:
LOO CV was incorrectly averaging over PCR components
Modified: pkg/R/crossval.pcr.R
===================================================================
--- pkg/R/crossval.pcr.R 2013-10-09 04:32:05 UTC (rev 385)
+++ pkg/R/crossval.pcr.R 2013-10-09 04:37:21 UTC (rev 386)
@@ -54,7 +54,7 @@
pred[i, j] <- Xi %*% FIT$B[, j, drop = FALSE] + B0
}
}
- pred <- rowMeans(pred, na.rm = TRUE)
+ ##pred <- rowMeans(pred, na.rm = TRUE)
}
if(identical(method, "kfold")) {
## form ncomp, as k-fold we have ceiling(N / nfold) fewer sites
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2013-10-09 04:32:05 UTC (rev 385)
+++ pkg/inst/ChangeLog 2013-10-09 04:37:21 UTC (rev 386)
@@ -23,6 +23,9 @@
* predict.pcr: Apply transformation function and stop is any form
of crossvalidation is selected (as not yet implemented).
+ * crossval.pcr: leave-one-out CV was incorrectly averaging over
+ components.
+
Version 0.11-5
* newDistance: (yet another) new distance() replacement to
More information about the Analogue-commits
mailing list