javax.datamining.statistics
Interface UnivariateStatistics


public interface UnivariateStatistics

A UnivariateStatistics captures the statistics for an attribute.

Author:
JSR-73 Java Data Mining Expert Group

Method Summary
 ContinuousStatistics getContinuousStatistics()
          Returns a continuous statistics (if available) of the attribute.
 DiscreteStatistics getDiscreteStatistics()
          Returns a discrete statistics (if available) of the attribute.
 long[] getFrequencies()
          Returns an array of frequencies for each value ordered according to object array returned from getValues.
 long getFrequency(CategoryProperty property)
          Returns the number of values with the specified property in the attribute.
 long getFrequency(int index)
          Returns the count of the value identified by the index.
 java.lang.String getName()
          Returns the name of the attribute .
 NumericalStatistics getNumericalStatistics()
          Returns a numerical statistics (if available) of the attribute.
 double[] getProbabilities()
          Returns an array of probabilities for each value, based on the total number of cases.
 java.lang.Object[] getValues()
          Returns the array of values (category values from a CategorySet object or Interval object) associated with the attribute.
 

Method Detail

getContinuousStatistics

public ContinuousStatistics getContinuousStatistics()
Returns a continuous statistics (if available) of the attribute.

Returns:
ContinuousStatistics

getDiscreteStatistics

public DiscreteStatistics getDiscreteStatistics()
Returns a discrete statistics (if available) of the attribute.

Returns:
DiscreteStatistics

getFrequencies

public long[] getFrequencies()
Returns an array of frequencies for each value ordered according to object array returned from getValues.

Returns:
long[]

getFrequency

public long getFrequency(CategoryProperty property)
Returns the number of values with the specified property in the attribute.

If the property is error for an attribute gender where F and M are the only valid values, for example, this method returns the number of occurrences of other values.

Parameters:
property -
Returns:
long

getFrequency

public long getFrequency(int index)
                  throws JDMException
Returns the count of the value identified by the index. The index corresponds to the value's position in the object array returned from getValues.

Parameters:
index -
Returns:
long
Throws:
JDMException

getName

public java.lang.String getName()
Returns the name of the attribute .

Returns:
String

getNumericalStatistics

public NumericalStatistics getNumericalStatistics()
Returns a numerical statistics (if available) of the attribute.

Returns:
NumericalStatistics

getProbabilities

public double[] getProbabilities()
Returns an array of probabilities for each value, based on the total number of cases. The probability of a value is defined as the frequency of the value divided by the total number of cases.

Returns:
double[]

getValues

public java.lang.Object[] getValues()
Returns the array of values (category values from a CategorySet object or Interval object) associated with the attribute.

Returns:
Object[]