net.sf.myra.datamining.data
Class DistanceContent

java.lang.Object
  extended by net.sf.myra.datamining.data.DistanceContent

public class DistanceContent
extends java.lang.Object

This class provides the distance information content for a Dataset instance.

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero
See Also:
Dataset, EntropyContent

Constructor Summary
DistanceContent(Dataset dataset)
          Default constructor.
 
Method Summary
 boolean contains(java.lang.String label)
          Returns true if the specified label corresponds to a term.
 double maximum()
          Returns the maximum (worst case) variance value.
static double variance(java.util.List<Instance> instances)
          Returns the variance of the list of instances' class labels.
static double variance(java.util.List<Instance> instances, double[] mean)
          Returns the variance of the list of instances and the mean class label array.
 double variance(java.lang.String label)
          Returns the variance associated with the specified term.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistanceContent

public DistanceContent(Dataset dataset)
Default constructor.

Parameters:
dataset - the dataset reference.
Method Detail

variance

public double variance(java.lang.String label)
Returns the variance associated with the specified term.

Parameters:
label - the label of the term.
Returns:
the variance associated with the specified term.

maximum

public double maximum()
Returns the maximum (worst case) variance value.

Returns:
the maximum (worst case) variance value.

contains

public boolean contains(java.lang.String label)
Returns true if the specified label corresponds to a term.

Parameters:
label - the label to check.
Returns:
true if the specified label corresponds to a term; false otherwise.

variance

public static double variance(java.util.List<Instance> instances)
Returns the variance of the list of instances' class labels.

Parameters:
instances - the list of instances.
Returns:
the variance of the list of instances' class labels.

variance

public static double variance(java.util.List<Instance> instances,
                              double[] mean)
Returns the variance of the list of instances and the mean class label array.

Parameters:
instances - the list of instances.
mean - the mean class label array.
Returns:
the variance of the list of instances and the mean class label array.


Copyright © 2013. All Rights Reserved.