|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.Storage.TrainingSample marf.Storage.Cluster
public class Cluster
Cluster contains a cluster information per subject.
$Id: Cluster.java,v 1.19 2008/02/20 07:29:06 mokhov Exp $
Field Summary |
---|
Fields inherited from class marf.Storage.TrainingSample |
---|
adDataVector, iSubjectID, oFilenames |
Constructor Summary | |
---|---|
Cluster()
Default cluster constructor. |
|
Cluster(Cluster poCluster)
Copy-constructor. |
Method Summary | |
---|---|
boolean |
addFeatureVector(double[] padFeatureVector,
java.lang.String pstrFilename,
int piSubjectID)
Adds new feature vector to the mean and recomputes the mean. |
boolean |
addFilename(java.lang.String pstrFilename)
Adds a filename to the training set. |
java.lang.Object |
clone()
Implements Cloneable interface for the Cluster object. |
void |
dumpCSV(java.io.BufferedWriter poWriter)
Write one training cluster as a CSV text. |
boolean |
existsFilename(java.lang.String pstrFilename)
Checks existence of the file in the training set. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
int |
getMeanCount()
Retrieves current mean count. |
void |
restoreCSV(java.io.BufferedReader poReader)
Retrieve one training cluster from the specified reader as a CSV text. |
void |
setMeanVector(double[] padMeanVector)
Sets new mean vector. |
java.lang.String |
toString()
Provides string representation of the training set data in addition to that of the parent TrainingSample. |
Methods inherited from class marf.Storage.TrainingSample |
---|
getDataVector, getMeanVector, getMedianVector, getSubjectID, setDataVector, setFeatureVector, setFilename, setSubjectID, size |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Cluster()
public Cluster(Cluster poCluster)
poCluster
- the Cluster object to copy properties ofMethod Detail |
---|
public boolean addFilename(java.lang.String pstrFilename)
addFilename
in interface ITrainingSample
addFilename
in class TrainingSample
pstrFilename
- filename to add
false
if the filename is already there; true
otherwiseexistsFilename(String)
public boolean existsFilename(java.lang.String pstrFilename)
existsFilename
in interface ITrainingSample
existsFilename
in class TrainingSample
pstrFilename
- filename to check
true
if the filename is there; false
if notpublic int getMeanCount()
getMeanCount
in interface ITrainingSample
getMeanCount
in class TrainingSample
ITrainingSample.getMeanCount()
public void setMeanVector(double[] padMeanVector)
padMeanVector
- double array representing the mean vectorpublic boolean addFeatureVector(double[] padFeatureVector, java.lang.String pstrFilename, int piSubjectID)
addFeatureVector
in interface ITrainingSample
addFeatureVector
in class TrainingSample
padFeatureVector
- vector to addpstrFilename
- filename to addpiSubjectID
- for which subject that vector is
true
if the vector was added; false
otherwiseITrainingSample.setFeatureVector(double[], String, int)
public void dumpCSV(java.io.BufferedWriter poWriter) throws StorageException
dumpCSV
in class TrainingSample
poWriter
- BufferedWriter to write to
StorageException
- in case of any error while dumpingpublic void restoreCSV(java.io.BufferedReader poReader) throws StorageException
restoreCSV
in class TrainingSample
poReader
- BufferedReader to read from
StorageException
- never thrown
NotImplementedException
public java.lang.Object clone()
clone
in class TrainingSample
Object.clone()
public java.lang.String toString()
toString
in class TrainingSample
TrainingSample.toString()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |