nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.aggregator
Class ConcatenationAggregator

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.aggregator.ConcatenationAggregator
All Implemented Interfaces:
AggregatorFunction

public class ConcatenationAggregator
extends java.lang.Object
implements AggregatorFunction


Constructor Summary
ConcatenationAggregator()
           
 
Method Summary
 weka.core.Instance[] aggregate(weka.core.Instance[] data, double[] weights)
          AggregatorFunction aggregates the given data, adjusted by the weights given, into one or more Instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcatenationAggregator

public ConcatenationAggregator()
Method Detail

aggregate

public weka.core.Instance[] aggregate(weka.core.Instance[] data,
                                      double[] weights)
Description copied from interface: AggregatorFunction

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.

Specified by:
aggregate in interface AggregatorFunction
Parameters:
data - array of Instance objects to aggregate
weights - array of relative weights of the Instance objects
Returns:
array containing the aggregated results