Skip to content

Commit

Permalink
Modify Scumble CV calculation
Browse files Browse the repository at this point in the history
Changes "manual" standard deviation for R's own sd (which is actually the sample standard
deviation).
  • Loading branch information
fdavidcl committed Nov 21, 2015
1 parent ab149db commit 8eb522f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/measures.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ dataset_measures <- function(mld) {
####################################
mld$labels$SCUMBLE.CV <- ifelse(mld$labels$SCUMBLE == 0 | colSums(mld$dataset[mld$labels$index]) == 0,
0,
sqrt(abs(colSums(mld$dataset[mld$labels$index] * mld$dataset$.SCUMBLE^2) /
colSums(mld$dataset[mld$labels$index]) - mld$labels$SCUMBLE^2)) / mld$labels$SCUMBLE)
sapply(mld$labels$index, function(i) sd(mld$dataset[mld$dataset[, i] != 0, ".SCUMBLE"])) / mld$labels$SCUMBLE
)
}
else {
mld$dataset$.labelcount <- numeric()
Expand Down

0 comments on commit 8eb522f

Please sign in to comment.