marf.Classification.Distance
Class DiffDistance

java.lang.Object
  |
  +--marf.Storage.StorageManager
        |
        +--marf.Classification.Classification
              |
              +--marf.Classification.Distance.Distance
                    |
                    +--marf.Classification.Distance.DiffDistance
All Implemented Interfaces:
IStorageManager, java.io.Serializable

public class DiffDistance
extends Distance

Diff-Distance Classifier.

$Id: DiffDistance.java,v 1.6 2005/06/02 01:49:40 mokhov Exp $

Since:
0.3.0
Version:
$Revision: 1.6 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
static double DEFAULT_ALLOWED_ERROR
          Default allowed difference between two features of 0.0001.
static double DISTANCE_FACTOR
          Default distance factor to add to the difference to make the subject more distant.
 
Fields inherited from class marf.Classification.Classification
oFeatureExtraction, oResultSet, oTrainingSet
 
Fields inherited from class marf.Storage.StorageManager
iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, INTERFACE_CODE_REVISION, sastrExtensionsMap
 
Constructor Summary
DiffDistance(marf.FeatureExtraction.FeatureExtraction poFeatureExtraction)
          DiffDistance Constructor.
 
Method Summary
 double distance(double[] padVector1, double[] padVector2)
          Diff-Distance implementation.
static java.lang.String getRevision()
          Retrieves class' revision.
 
Methods inherited from class marf.Classification.Distance.Distance
classify, getResult
 
Methods inherited from class marf.Classification.Classification
dump, getResultSet, getTrainingSetFilename, restore, train
 
Methods inherited from class marf.Storage.StorageManager
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, 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

DEFAULT_ALLOWED_ERROR

public static final double DEFAULT_ALLOWED_ERROR
Default allowed difference between two features of 0.0001.

See Also:
Constant Field Values

DISTANCE_FACTOR

public static final double DISTANCE_FACTOR
Default distance factor to add to the difference to make the subject more distant.

See Also:
Constant Field Values
Constructor Detail

DiffDistance

public DiffDistance(marf.FeatureExtraction.FeatureExtraction poFeatureExtraction)
DiffDistance Constructor.

Parameters:
poFeatureExtraction - FeatureExtraction module reference
Method Detail

distance

public final double distance(double[] padVector1,
                             double[] padVector2)
Diff-Distance implementation.

Specified by:
distance in class Distance
Parameters:
padVector1 - first vector to compare
padVector2 - second vector to compare
Returns:
diff-distance between two feature vectors

getRevision

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

Returns:
revision string