|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--marf.Storage.StorageManager | +--marf.Storage.TrainingSet
TrainingSet -- Encapsulates Subject ID and subject's clusters or a feature set.
$Id: TrainingSet.java,v 1.43 2005/08/12 11:53:55 susan_fan Exp $
Field Summary | |
static java.lang.String |
DEFAULT_TRAINING_SET_FILENAME
Default TrainingSet file name of marf.training.set . |
protected int |
iFeatureExtractionMethod
Which feature extraction method was used to determine this feature vector. |
protected int |
iPreprocessingMethod
Which preprocessing method was applied to the sample before this feature vector was extracted. |
protected java.util.Vector |
oClusters
A Vector of Clusters. |
protected marf.Storage.FeatureSet |
oFeatureSet
Feature Set as opposed to the cluster. |
Fields inherited from class marf.Storage.StorageManager |
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename |
Fields inherited from interface marf.Storage.IStorageManager |
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS |
Constructor Summary | |
TrainingSet()
Construct a training set object. |
Method Summary | |
boolean |
addFeatureVector(double[] padFeatureVector,
java.lang.String pstrFilename,
int piSubjectID,
int piPreprocessingMethod,
int piFeatureExtractionMethod)
Adds new feature vector to the mean and recomputes the mean. |
void |
dump()
Dump the current training set to disk. |
java.util.Vector |
getClusters()
Retrieves clusters of training samples. |
int |
getFeatureExtractionMethod()
Returns preprocessing method used on this training set. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
int |
getPreprocessingMethod()
Returns preprocessing method used on this training set. |
void |
restore()
Retrieve the current training set from disk. |
void |
setFeatureExtractionMethod(int piFeatureExtractionMethod)
Sets feature extraction method used on this training set. |
void |
setPreprocessingMethod(int piPreprocessingMethod)
Sets feature extraction method used on this training set. |
int |
size()
Gets the size of the feature vectors set. |
Methods inherited from class marf.Storage.StorageManager |
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final transient java.lang.String DEFAULT_TRAINING_SET_FILENAME
marf.training.set
.
protected java.util.Vector oClusters
protected marf.Storage.FeatureSet oFeatureSet
protected int iPreprocessingMethod
protected int iFeatureExtractionMethod
Constructor Detail |
public TrainingSet()
Method Detail |
public final java.util.Vector getClusters()
public final int getPreprocessingMethod()
public final int getFeatureExtractionMethod()
public final void setPreprocessingMethod(int piPreprocessingMethod)
piPreprocessingMethod
- the methodpublic final void setFeatureExtractionMethod(int piFeatureExtractionMethod)
piFeatureExtractionMethod
- the methodpublic final boolean addFeatureVector(double[] padFeatureVector, java.lang.String pstrFilename, int piSubjectID, int piPreprocessingMethod, int piFeatureExtractionMethod)
padFeatureVector
- vector to addpstrFilename
- to check to avoid training on the same filepiSubjectID
- for which subject that vector ispiPreprocessingMethod
- preprocessing method usedpiFeatureExtractionMethod
- feature extraction method used
true
if the vector was added; false
otherwisepublic final int size()
public void restore() throws StorageException
restore
in interface IStorageManager
restore
in class StorageManager
StorageException
- in a case of I/O or otherwise errorIStorageManager.DUMP_GZIP_BINARY
,
IStorageManager.DUMP_BINARY
,
StorageManager.dumpGzipBinary()
,
StorageManager.dumpCSV()
,
StorageManager.dumpBinary()
,
StorageManager.dumpXML()
,
StorageManager.dumpHTML()
,
StorageManager.dumpSQL()
,
StorageManager.backSynchronizeObject()
,
StorageManager.iCurrentDumpMode
public void dump() throws StorageException
dump
in interface IStorageManager
dump
in class StorageManager
StorageException
- in a case of I/O or otherwise errorIStorageManager.DUMP_GZIP_BINARY
,
IStorageManager.DUMP_BINARY
,
StorageManager.dumpGzipBinary()
,
StorageManager.dumpCSV()
,
StorageManager.dumpBinary()
,
StorageManager.dumpXML()
,
StorageManager.dumpHTML()
,
StorageManager.dumpSQL()
,
StorageManager.backSynchronizeObject()
,
StorageManager.iCurrentDumpMode
public static java.lang.String getMARFSourceCodeRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |