marf.Classification.Distance
Class Distance
java.lang.Object
marf.Storage.StorageManager
marf.Classification.Classification
marf.Classification.Distance.Distance
- All Implemented Interfaces:
- java.lang.Cloneable, IClassification, IStorageManager, java.io.Serializable
- Direct Known Subclasses:
- ChebyshevDistance, DiffDistance, EuclideanDistance, MahalanobisDistance, MinkowskiDistance
- public abstract class Distance
- extends Classification
Abstract Distance Classifier.
$Id: Distance.java,v 1.30 2005/12/24 19:47:37 mokhov Exp $
- Since:
- 0.0.1
- Version:
- $Revision: 1.30 $
- Author:
- Serguei Mokhov
- See Also:
- Serialized Form
Method Summary |
boolean |
classify()
Classify the feature vector based on whatever
distance() derivatives implement. |
abstract double |
distance(double[] paVector1,
double[] paVector2)
Generic distance routine. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
Result |
getResult()
Retrieves the minimum-distance classification result. |
Methods inherited from class marf.Storage.StorageManager |
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, hashCode, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Distance
public Distance(IFeatureExtraction poFeatureExtraction)
- Distance Constructor.
- Parameters:
poFeatureExtraction
- FeatureExtraction module reference
classify
public final boolean classify()
throws ClassificationException
- Classify the feature vector based on whatever
distance()
derivatives implement.
- Returns:
- true if classification successful whatever that means
- Throws:
ClassificationException
- if sanity checks fail. The checks include
verifying nullness of the mean vector and its length compared to the
feature vector or encapsulation of StorageException when dumping/restoring.- See Also:
distance(double[], double[])
distance
public abstract double distance(double[] paVector1,
double[] paVector2)
- Generic distance routine. To be overridden.
- Parameters:
paVector1
- first vector for distance calculationpaVector2
- second vector for distance calculation
- Returns:
- distance between the two vectors
getResult
public Result getResult()
- Retrieves the minimum-distance classification result.
- Returns:
- Result object
- Since:
- 0.3.0
getMARFSourceCodeRevision
public static java.lang.String getMARFSourceCodeRevision()
- Retrieves class' revision.
- Returns:
- revision string
- Since:
- 0.3.0.2