marf.Classification.Distance
Class MahalanobisDistance

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.Classification.Classification
          extended by marf.Classification.Distance.Distance
              extended by marf.Classification.Distance.MahalanobisDistance
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IClassification, IStorageManager

public class MahalanobisDistance
extends Distance

Mahalanobis Distance Classification Module.

NOTE: Implemented as equivalent to Euclidean Distance in 0.2.0, i.e. the Covariance matrix is always an Indentity one.

$Id: MahalanobisDistance.java,v 1.23 2006/12/11 22:56:34 mokhov Exp $

Since:
0.2.0
Version:
$Revision: 1.23 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class marf.Classification.Classification
adFeatureVector, oFeatureExtraction, oResultSet, oTrainingSet
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Classification.IClassification
MARF_INTERFACE_CODE_REVISION
 
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
MahalanobisDistance(IFeatureExtraction poFeatureExtraction)
          MahalanobisDistance Constructor.
 
Method Summary
 double distance(double[] paVector1, double[] paVector2)
          Partial MahalanobisDistance implementation.
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 
Methods inherited from class marf.Classification.Distance.Distance
classify, getResult
 
Methods inherited from class marf.Classification.Classification
classify, clone, dump, getFeatureExtraction, getResultSet, getTrainingSetFilename, loadTrainingSet, restore, setFeatureExtraction, train, train
 
Methods inherited from class marf.Storage.StorageManager
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, hashCode, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MahalanobisDistance

public MahalanobisDistance(IFeatureExtraction poFeatureExtraction)
MahalanobisDistance Constructor.

Parameters:
poFeatureExtraction - FeatureExtraction module reference
Method Detail

distance

public final double distance(double[] paVector1,
                             double[] paVector2)
Partial MahalanobisDistance implementation.

Specified by:
distance in class Distance
Parameters:
paVector1 - first vector to compare
paVector2 - second vector to compare
Returns:
Mahalanobis distance between two feature vectors

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo