|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.Storage.TrainingSample
TrainingSample contains one item in the training set. Each training sample consists of the feature vector plus information describing that feature vector. Has been extracted from TrainingSet in 0.3.0. TODO: fix CSV dumps
$Id: TrainingSample.java,v 1.10 2006/01/02 22:24:00 mokhov Exp $
Field Summary | |
protected double[] |
adDataVector
Array represinting either a feature or mean vector describing the cluster. |
protected int |
iSubjectID
Which subject this feature vector is associated with. |
protected java.util.Vector |
oFilenames
A list of filenames that were used in training for this cluster. |
Constructor Summary | |
TrainingSample()
Default training sample constructor. |
|
TrainingSample(TrainingSample poTrainingSample)
Copy-constructor. |
Method Summary | |
java.lang.Object |
clone()
Implements Cloneable interface for the TrainingSample object. |
void |
dumpCSV(java.io.BufferedWriter poBufferedWriter)
Writes one training sample to a CSV file. |
double[] |
getDataVector()
Retrieves the data vector. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
int |
getSubjectID()
Retrieves Subject ID of a particular training sample. |
void |
restoreCSV(java.io.BufferedReader poBufferedReader)
Retrieve one training sample from a CSV file. |
void |
setDataVector(double[] padDataVector)
Sets new mean vector. |
void |
setFilename(java.lang.String pstrFilename)
Sets a filename of the training sample. |
void |
setSubjectID(int piSubjectID)
Sets new Subject ID. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int iSubjectID
protected double[] adDataVector
protected java.util.Vector oFilenames
Constructor Detail |
public TrainingSample()
public TrainingSample(TrainingSample poTrainingSample)
poTrainingSample
- TrainingSample object to copyMethod Detail |
public final void setFilename(java.lang.String pstrFilename)
pstrFilename
- filename to setpublic final int getSubjectID()
public final double[] getDataVector()
public final void setSubjectID(int piSubjectID)
piSubjectID
- integer IDpublic final void setDataVector(double[] padDataVector)
padDataVector
- double array representing the mean vectorpublic void dumpCSV(java.io.BufferedWriter poBufferedWriter) throws StorageException
poBufferedWriter
- BufferedWriter
StorageException
- in case of I/O or otherwise errorpublic void restoreCSV(java.io.BufferedReader poBufferedReader) throws StorageException
poBufferedReader
- BufferedReader
StorageException
- in case of I/O or otherwise errorpublic java.lang.Object clone()
Object.clone()
public static java.lang.String getMARFSourceCodeRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |