keepThreshold: Filters for Threshold

Description Usage Arguments Value See Also Examples

View source: R/keepThreshold.R

Description

Filters for all cascades that match the comparison with a minimal classwise sensitivity threshold.

Usage

1
keepThreshold(subcascades = NULL, thresh = 0, comparison = ">=")

Arguments

subcascades

A Subcascades object as it is returned by subcascades-function. The Subcascades object is made up of a list of matrices. Each matrix comprises the evaluation results of cascades of a specific length and is sorted row-wise according to the achieved minimal classwise sensitivities of the cascades (decreasing). The rownames show the class order by a character string of type '1>2>3' and the entries the sensitivity for each position of the cascade.

thresh

A numeric value between 0 and 1. The minimal sensitivity threshold used to filter the returned cascades. Only cascades that pass this threshold are returned. If 0 is used the returned cascades are filtered for >0 and otherwise >= thresh. For low thresholds the calculation lasts longer.

comparison

Defines the comparison type (<,>,<=,>=) for the threshold.

Value

A Subcascades object comprising the evaluated cascades and their performances. The Subcascades object is made up of a list of matrices. Each matrix comprises the evaluation results of cascades of a specific length and is sorted row-wise according to the achieved minimal classwise sensitivities of the cascades (decreasing). The rownames show the class order by a character string of type '1>2>3' and the entries the sensitivity for each position of the cascade.

See Also

dropSize, keepSize, dropSets, keepSets, dropThreshold

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(TunePareto)
data(esl)
data = esl$data
labels = esl$labels
foldList = generateCVRuns(labels  = labels,
                          ntimes      = 2,
                          nfold       = 2,
                          leaveOneOut = FALSE,
                          stratified  = TRUE)
predMap = predictionMap(data, labels, foldList = foldList, 
                       classifier = tunePareto.svm(), kernel='linear')
# generate Subcascades object
subc = subcascades(predMap,thresh=0.5)

# filters for cascades that 
# 1. have a minimal classwise sensitivity >= 0.6
keepThreshold(subc,thresh=0.6)
# 2. have a minimal classwise sensitivity <= 0.6
keepThreshold(subc, comparison = '<=', thresh=0.6)

ORION documentation built on Feb. 7, 2022, 5:15 p.m.