hhreco.classification
Class DataRep

java.lang.Object
  extended byhhreco.classification.DataRep

public class DataRep
extends java.lang.Object

Representing a collection of data with the means, standard deviations, and variances of the feature components.


Field Summary
(package private)  int _n
          The number of examples
 
Constructor Summary
DataRep(FeatureSet[] examples, int numFeatures)
          Compute the means, standard deviations, variances from the given set of feature vectors.
 
Method Summary
static double[] computeMeans(double[][] fvals, int numFeatures)
          Compute the means for the feature elements from the given set of examples, fvals.
static double[] computeStd(double[] means, double[][] fvals, int numFeatures)
          Compute the standard deviations for the feature elements from the given set of examples, fvals.
static double[] computeVariances(double[] means, double[][] fvals, int numFeatures)
          Compute the variances for the feature elements from the given set of examples, fvals.
 double[] getMeans()
          Return the mean vector.
 double[] getStds()
          Return the standard deviations of the feature components.
 double[] getVariances()
          Return the variances of the feature components.
 java.lang.String toString()
          The text representation of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_n

int _n
The number of examples

Constructor Detail

DataRep

public DataRep(FeatureSet[] examples,
               int numFeatures)
Compute the means, standard deviations, variances from the given set of feature vectors.

Method Detail

getMeans

public double[] getMeans()
Return the mean vector.


getStds

public double[] getStds()
Return the standard deviations of the feature components.


getVariances

public double[] getVariances()
Return the variances of the feature components.


computeMeans

public static double[] computeMeans(double[][] fvals,
                                    int numFeatures)
Compute the means for the feature elements from the given set of examples, fvals.


computeStd

public static double[] computeStd(double[] means,
                                  double[][] fvals,
                                  int numFeatures)
Compute the standard deviations for the feature elements from the given set of examples, fvals.


computeVariances

public static double[] computeVariances(double[] means,
                                        double[][] fvals,
                                        int numFeatures)
Compute the variances for the feature elements from the given set of examples, fvals.


toString

public java.lang.String toString()
The text representation of this class.