emolib.classifier.machinelearning
Class Logistic.VectorStatistics

java.lang.Object
  extended by emolib.classifier.machinelearning.Logistic.VectorStatistics
Enclosing class:
Logistic

public class Logistic.VectorStatistics
extends java.lang.Object

Inner class to compute vector statistics.


Constructor Summary
Logistic.VectorStatistics()
          Plain constructor.
 
Method Summary
 void computeStatistics()
          Function to compute the dimensional means and variances.
 double[] getMeanSubtractedVector(int ex)
          Function to get a mean-subtracted vector example.
 double getSampleMean(int dim)
          Function to compute the sample mean of the given dimension.
 double[] getStandardisedVector(int ex)
          Function to get a standardised vector example.
 double[] getVariances()
          Function to retrieve the variances.
 void inputVector(double[] vec)
          Method to intput a vector.
 void setInterceptVariance()
          Set intercept feature.
 void standardise(double[] vec)
          Method to standardise the given vector.
 void subtractMeans(double[] vec)
          Method to subtract the means of the given vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logistic.VectorStatistics

public Logistic.VectorStatistics()
Plain constructor.

Method Detail

getVariances

public double[] getVariances()
Function to retrieve the variances.

Returns:
The variances.

inputVector

public void inputVector(double[] vec)
Method to intput a vector.

Parameters:
vec - The input vector.

computeStatistics

public void computeStatistics()
Function to compute the dimensional means and variances. It is computed as the sample mean and variance.


getSampleMean

public double getSampleMean(int dim)
Function to compute the sample mean of the given dimension.

Parameters:
dim - The given dimension.
Returns:
The sample mean.

setInterceptVariance

public void setInterceptVariance()
Set intercept feature.


getStandardisedVector

public double[] getStandardisedVector(int ex)
Function to get a standardised vector example.

Parameters:
ex - The example number.
Returns:
The standardised vector example.

standardise

public void standardise(double[] vec)
Method to standardise the given vector.


getMeanSubtractedVector

public double[] getMeanSubtractedVector(int ex)
Function to get a mean-subtracted vector example.

Parameters:
ex - The example number.
Returns:
The corrected vector example.

subtractMeans

public void subtractMeans(double[] vec)
Method to subtract the means of the given vector.