marf.Storage
Interface ITrainingSample

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
Cluster, FeatureSet, TrainingSample

public interface ITrainingSample
extends java.io.Serializable, java.lang.Cloneable

All training set beans should implement this interface.

$Id: ITrainingSample.java,v 1.2 2007/12/23 06:29:46 mokhov Exp $

Since:
0.3.0.6
Version:
$Revision: 1.2 $
Author:
Serguei Mokhov

Method Summary
 boolean addFeatureVector(double[] padFeatureVector, java.lang.String pstrFilename, int piSubjectID)
          Fully equivalent to setFeatureVector().
 boolean addFilename(java.lang.String pstrFilename)
           
 boolean existsFilename(java.lang.String pstrFilename)
          Checks existence of the file in the training sample.
 double[] getDataVector()
          Retrieves the data vector.
 int getMeanCount()
          Retrieves current mean count.
 double[] getMeanVector()
          Retrieves the mean vector.
 double[] getMedianVector()
           
 int getSubjectID()
          Retrieves Subject ID of a particular training sample.
 void setDataVector(double[] padDataVector)
          Sets new mean vector.
 boolean setFeatureVector(double[] padFeatureVector, java.lang.String pstrFilename, int piSubjectID)
           
 void setFilename(java.lang.String pstrFilename)
          Sets a filename of the training sample.
 void setSubjectID(int piSubjectID)
          Sets new Subject ID.
 int size()
           
 

Method Detail

setFeatureVector

boolean setFeatureVector(double[] padFeatureVector,
                         java.lang.String pstrFilename,
                         int piSubjectID)
Parameters:
padFeatureVector -
pstrFilename -
piSubjectID -
Returns:

addFeatureVector

boolean addFeatureVector(double[] padFeatureVector,
                         java.lang.String pstrFilename,
                         int piSubjectID)
Fully equivalent to setFeatureVector().

Parameters:
padFeatureVector -
pstrFilename -
piSubjectID -
Returns:
See Also:
setFeatureVector(double[], String, int)

setFilename

void setFilename(java.lang.String pstrFilename)
Sets a filename of the training sample. Always set the first element of the list of filenames.

Parameters:
pstrFilename - filename to set

addFilename

boolean addFilename(java.lang.String pstrFilename)
Parameters:
pstrFilename -
Returns:

existsFilename

boolean existsFilename(java.lang.String pstrFilename)
Checks existence of the file in the training sample. Serves as an indication that we already trained on the given file.

Parameters:
pstrFilename - filename to check
Returns:
true if the filename is there; false if not

getSubjectID

int getSubjectID()
Retrieves Subject ID of a particular training sample.

Returns:
int ID

getDataVector

double[] getDataVector()
Retrieves the data vector.

Returns:
array of doubles representing the data for this subject

setSubjectID

void setSubjectID(int piSubjectID)
Sets new Subject ID.

Parameters:
piSubjectID - integer ID

setDataVector

void setDataVector(double[] padDataVector)
Sets new mean vector.

Parameters:
padDataVector - double array representing the mean vector

getMeanCount

int getMeanCount()
Retrieves current mean count.

Returns:
mean count

getMeanVector

double[] getMeanVector()
Retrieves the mean vector.

Returns:
array of doubles representing the mean for that cluster

getMedianVector

double[] getMedianVector()
Returns:

size

int size()
Returns:


SourceForge Logo