\HeaderA{aggregator}{A Simple Class for Aggregators}{aggregator}
\aliasA{aggenv,aggregator-method}{aggregator}{aggenv,aggregator.Rdash.method}
\aliasA{aggfun,aggregator-method}{aggregator}{aggfun,aggregator.Rdash.method}
\aliasA{aggregator-class}{aggregator}{aggregator.Rdash.class}
\aliasA{class:aggregator}{aggregator}{class:aggregator}
\aliasA{initfun,aggregator-method}{aggregator}{initfun,aggregator.Rdash.method}
\aliasA{initialize,aggregator-method}{aggregator}{initialize,aggregator.Rdash.method}
\keyword{methods}{aggregator}
\keyword{classes}{aggregator}
\begin{Description}\relax
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.
\end{Description}
\begin{Details}\relax
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 \code{aggenv}.
\end{Details}
\begin{Section}{Creating Objects}
\code{new('aggregator', aggenv  = [environment], initfun = [function], aggfun  = [function])}
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{aggenv}:] Object of class 'environment', holds the values between iterations
\item[\code{initfun}:] Object of class 'function' specifies how to initialize the value for a name the first time it is encountered
\item[\code{aggfun}:] Object of class 'function' used to increment (or perform any other function) on a name
}
\end{Section}
\begin{Section}{Methods}
\describe{
\item[\code{aggenv(aggregator)}:] Used to access the environment of the aggregator
\item[\code{aggfun(aggregator)}:] Used to access the function that aggregates
\item[\code{initfun(aggregator)}:] Used to access the initializer function
}
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{Aggregate}{Aggregate}}
\end{SeeAlso}

