Commit 1f5e40d0 authored by Jakob Wirbel's avatar Jakob Wirbel

In feature selection with a specific direction, collect only...

In feature selection with a specific direction, collect only positively/negatively associated features for gFC and AUC.
parent cf741ca2
......@@ -311,7 +311,9 @@ train.model <- function(siamcat,
} else if (param.fs$direction == 'negative'){
assoc <- 1 - assoc
}
data <- data[,rank(-assoc) <= param.fs$thres.fs]
asso <- assoc[assoc > 0.5]
data <- data[,names(which(
rank(-assoc) <= param.fs$thres.fs))]
} else if (param.fs$method.fs == 'gFC') {
assoc <- vapply(data,
FUN=get.quantile.FC,
......@@ -324,7 +326,10 @@ train.model <- function(siamcat,
} else if (param.fs$direction == 'negative'){
assoc <- -assoc
}
data <- data[,rank(-assoc) <= param.fs$thres.fs]
assoc <- assoc[assoc > 0]
data <- data[,names(which(
rank(-assoc) <= param.fs$thres.fs))]
}
stopifnot(ncol(data) > 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment