functionalDetectionStats: Given a vector functional (true) attribute associations and a...

View source: R/nestedCV.R

functionalDetectionStatsR Documentation

Given a vector functional (true) attribute associations and a vector of positive associations, returns detection statistics like true positive rate, recall and precision.

Description

Given a vector functional (true) attribute associations and a vector of positive associations, returns detection statistics like true positive rate, recall and precision.

Usage

functionalDetectionStats(functional, positives)

Arguments

functional

A vector functional (true) attributes

positives

A vector of positive associations

Value

A list with:

TP

True Positive

FP

False Positive

FN

False Negative

TPR

True Positive Rate

FPR

False Positive Rate

precision

Fraction of relevant features among the retrieved features

recall

Fraction of total relevant features that were actually retrieved

num.samples <- 100 num.variables <- 100 pct.signals <- 0.1 label <- "class" sim.data <- createSimulation(num.samples = num.samples, num.variables = num.variables, pct.signals = pct.signals, sim.type = "mainEffect", label = label, verbose = FALSE) rnCV.results <- regular_nestedCV(train.ds = sim.data$train, validation.ds = sim.data$holdout, label = label, is.simulated = TRUE, ncv_folds = c(10, 10), param.tune = FALSE, learning_method = "rf", importance.algorithm = "ReliefFbestK", num_tree = 500, verbose = FALSE) functional <- data.sets$signal.names rncv.positives <- rncv_result$Features rncv.detect <- functionalDetectionStats(functional, rncv.positives)

See Also

Other nestedCV: consensus_nestedCV(), regular_nestedCV()


insilico/cncv documentation built on April 1, 2022, 8:53 p.m.