nz.ac.waikato.mcennis.rat.reusablecores.aggregator
Interface AggregatorFunction

All Known Implementing Classes:
ConcatenationAggregator, FirstItemAggregator, MaxAggregator, MeanAggregator, MinAggregator, NullAggregator, ProductAggregator, StandardDeviationAggregator, SumAggregator

public interface AggregatorFunction


Method Summary
 Instance[] aggregate(Instance[] data, double[] weights)
          AggregatorFunction aggregates the given data, adjusted by the weights given, into one or more Instances.
 AggregatorFunction prototype()
           
 

Method Detail

aggregate

Instance[] aggregate(Instance[] data,
                     double[] weights)

AggregatorFunction aggregates the given data, adjusted by the weights given, into one or more Instances.



The data array may be null, but if it is not null, every Instance in the array must be backed by an Instances object. Some aggregators require that all elements in the data array be backed by the same or equivelant Instances object. Other aggregators require that every element in the data array e backed by an Instances object that has disjoint attribute names compared to other elements' Instances object. Others have no restrictions at all. See the documentation of each aggregator function to determine what additional restrictions on backing dataset are necessary.



If the data array is null, the weights array should be either null or of length 0. In all other cases, this array must match the length of the data array.



In the event of null input, the aggregator should return an empty Instance array. In general, when meaningful results can not be returned, an empty Instance array is appropriate return value.

In the event of an error, the aggregator should log a meaningful error (with stack trace if it involves an exception or error) with the logger identified by the aggregator class name. Logging of debugging info should be at a lower priority than the INFO level (the default logging level.) No exceptions should be propogated back to the caller.

Parameters:
data - array of Instance objects to aggregate
weights - array of relative weights of the Instance objects
Returns:
array containing the aggregated results

prototype

AggregatorFunction prototype()

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads