groupwise: Coerce to a Groupwise object

Description Usage Arguments Details Value See Also Examples

View source: R/groupwise.R

Description

Converts from a Subcascades object to a Groupwise object.

Usage

1
groupwise(subcascades = NULL, maxCl = 50)

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.

maxCl

An integer defining the lower bound for the maximal number of classes. Has only to be set if the analyzed dataset has more than 50 classes.

Details

This function re-sorts the Subcascades object in a way that the cascades made up of the same classes are grouped.

Value

A Groupwise object, which comprises a two-leveled list. The first level collects cascades of the same size. The second level contains a list of unique class combinations, labelled as a character string with '-' separating the different classes. For each unique set of class combinations the corresponding orders and their performance are given as a matrix, where each row contains a cascade, given as a character string of type '1>2>3', and the columns the sensitivity for the class at the corresponding position. Each matrix is sorted row-wise according to the achieved minimal classwise sensitivites of the cascades (decreasing).

See Also

as.subcascades, summary.Groupwise, print.Groupwise, plot.Groupwise, as.edgedataframe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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
subcascades = subcascades(predMap,thresh=0.7)

#create a Groupwise object
groupwise = groupwise(subcascades)

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