com.rapidminer.operator.learner.tree
Class FrequencyCalculator

java.lang.Object
  extended by com.rapidminer.operator.learner.tree.FrequencyCalculator

public class FrequencyCalculator
extends java.lang.Object

Calculates frequencies and weights.

Author:
Sebastian Land, Ingo Mierswa

Constructor Summary
FrequencyCalculator()
           
 
Method Summary
 double[] getLabelWeights(ExampleSet exampleSet)
          Returns an array of size of the number of different label values.
 double[][] getNominalWeightCounts(ExampleSet exampleSet, Attribute attribute)
           
 double[][] getNumericalWeightCounts(ExampleSet exampleSet, Attribute attribute, double splitValue)
           
 double[] getPartitionWeights(SplittedExampleSet splitted)
          Returns an array of the size of the partitions.
 double getTotalWeight(double[] weights)
          Returns the sum of the given weights.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrequencyCalculator

public FrequencyCalculator()
Method Detail

getNumericalWeightCounts

public double[][] getNumericalWeightCounts(ExampleSet exampleSet,
                                           Attribute attribute,
                                           double splitValue)

getNominalWeightCounts

public double[][] getNominalWeightCounts(ExampleSet exampleSet,
                                         Attribute attribute)

getPartitionWeights

public double[] getPartitionWeights(SplittedExampleSet splitted)
Returns an array of the size of the partitions. Each entry contains the sum of all weights of the corresponding partition.


getLabelWeights

public double[] getLabelWeights(ExampleSet exampleSet)
Returns an array of size of the number of different label values. Each entry corresponds to the weight sum of all examples with the current label.


getTotalWeight

public double getTotalWeight(double[] weights)
Returns the sum of the given weights.



Copyright © 2001-2009 by Rapid-I