| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.Storage.StorageManager
marf.Storage.TrainingSet
public class TrainingSet
TrainingSet -- Encapsulates Subject ID and subject's clusters or a feature set.
$Id: TrainingSet.java,v 1.49 2008/02/20 07:29:06 mokhov 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  int | 
iTrainingSetFormat
 | 
protected  java.util.Vector | 
oTrainingSamples
A collection of Clusters.  | 
static int | 
TRAINING_SET_CLUSTERS
 | 
static int | 
TRAINING_SET_FEATURE_SETS
 | 
static int | 
TRAINING_SET_SAMPLES
 | 
| 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 | 
backSynchronizeObject()
Must to be overridden by the modules that use object serialization with the generic implementation of restore(). | 
 java.lang.Object | 
clone()
Implements Cloneable interface for the TrainingSet object.  | 
 void | 
dumpCSV()
If derivatives use the generic implementation of dump()
 with the CSV dump mode, they must override this method. | 
 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.  | 
 int | 
getTrainingSetFormat()
 | 
 void | 
restore()
Retrieves the current training set from disk.  | 
 void | 
restoreCSV()
If derivatives use the generic implementation of restore()
 with the CSV dump mode, they must override this method. | 
 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.  | 
 void | 
setTrainingSetFormat(int piTrainingSetFormat)
 | 
 int | 
size()
Gets the size of the feature vectors set.  | 
 java.lang.String | 
toString()
Provides string representation of the training set data in addition to that of the parent StorageManager.  | 
| Methods inherited from class marf.Storage.StorageManager | 
|---|
dump, dumpBinary, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, hashCode, restoreBinary, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename | 
| Methods inherited from class java.lang.Object | 
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String DEFAULT_TRAINING_SET_FILENAME
marf.training.set.
public static final int TRAINING_SET_SAMPLES
public static final int TRAINING_SET_CLUSTERS
public static final int TRAINING_SET_FEATURE_SETS
protected int iTrainingSetFormat
protected java.util.Vector oTrainingSamples
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 method
public 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 restoreCSV()
                throws StorageException
StorageManagerrestore()
 with the CSV dump mode, they must override this method.
restoreCSV in interface IStorageManagerrestoreCSV in class StorageManagerStorageException - in case of I/O or otherwise errorIStorageManager.restoreCSV()
public void restore()
             throws StorageException
restore in interface IStorageManagerrestore in class StorageManagerStorageException - in a case of I/O or otherwise errorIStorageManager.restore()
public void dumpCSV()
             throws StorageException
StorageManagerdump()
 with the CSV dump mode, they must override this method.
dumpCSV in interface IStorageManagerdumpCSV in class StorageManagerStorageException - in case of I/O or otherwise errorIStorageManager.dumpCSV()public int getTrainingSetFormat()
public void setTrainingSetFormat(int piTrainingSetFormat)
piTrainingSetFormat - The iTrainingSetFormat to set.public void backSynchronizeObject()
StorageManagerrestore(). By default
 this method is unimplemented.
backSynchronizeObject in class StorageManagerStorageManager.backSynchronizeObject()public java.lang.Object clone()
clone in class StorageManagerObject.clone()public java.lang.String toString()
toString in class StorageManagerStorageManager.toString()public static java.lang.String getMARFSourceCodeRevision()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||