keepSize {ORION} | R Documentation |
Filter for Size
Description
Filters the Subcascades object for cascades of the given sizes.
Usage
keepSize(subcascades = NULL, size = NA)
Arguments
subcascades |
A Subcascades object as it is returned by |
size |
A numeric value that defines the size of the cascades that should be returned. The smallest size is 2 and the largest the maximal number of classes of the current dataset. |
Value
A Subcascades object as in subcascades
, that only includes cascades of specific lengths.
See Also
dropSize
, dropSets
, keepSets
, dropThreshold
, keepThreshold
Examples
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.7)
# filters for cascades that have a length of 3
keepSize(subc,size=3)
# filters for cascades that have a length of 3 or 4
keepSize(subc, size=c(3,4))