aggregator-class {Biobase}R Documentation

Class aggregator, a class of aggregators

Description

A class of objects designed to help aggregate calculations over an iterative computation. The aggregator consists of three objects. An environment to hold the values. A function that sets up an initial value the first time an object is seen. An aggregate function that increments the value of an object seen previously.

Details

This class is used to help aggregate different values over function calls. A very simple example is to use leave one out cross-validation for prediction. At each stage we first perform feature selection and then cross-validate. To keep track of how often each feature is selected we can use an aggregator. At the end of the cross-validation we can extract the names of the features chosen from aggenv.

Creating Objects

new('aggregator',
aggenv = ..../, # Object of class environment
initfun = ...., # Object of class function
aggfun = ...., # Object of class function
)

Slots

aggenv:
Object of class "environment", holds the values between iterations.
initfun:
Object of class "function" specifies how to initialize the value for a name the first time it is encountered.
aggfun:
Object of class "function" used to increment (or perform any other function) on a name.

Prototype

describe{

aggenv:
new.env(hash=TRUE)
initfun:
function(name, val) 1
aggfun:
function(name, current, val) current+1
}

Methods

aggenv
(aggregator): Used to access the environment of the aggregator.
aggfun
(aggregator): Used to access the function that aggregates.
initfun
(aggregator): Used to access the initializer function.

[Package Biobase version 1.4.15 Index]