de.lmu.ifi.dbs.elki.distance.distancefunction
Class FrequencyDependentItemsetDistanceFunction
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction<BitVector>
de.lmu.ifi.dbs.elki.distance.distancefunction.SharingDependentItemsetDistanceFunction
de.lmu.ifi.dbs.elki.distance.distancefunction.FrequencyDependentItemsetDistanceFunction
- All Implemented Interfaces:
- DistanceFunction<BitVector,DoubleDistance>, MeasurementFunction<BitVector,DoubleDistance>, Loggable, Parameterizable
- Direct Known Subclasses:
- DirectSupportDependentItemsetDistanceFunction, ReciprocalSupportDependentItemsetDistanceFunction, SquareRootSupportLengthDependentItemsetDistanceFunction, SupportLengthDependentItemsetDistanceFunction
public abstract class FrequencyDependentItemsetDistanceFunction
- extends SharingDependentItemsetDistanceFunction
Provides a DistanceFunction to compute a Distance between BitVectors based on
the number of shared bits.
- Author:
- Arthur Zimek
todo implement DatabaseListener
Method Summary |
void |
setDatabase(Database<BitVector> database,
boolean verbose,
boolean time)
Sets the database, initializes a new map of frequencies. |
protected double |
support(BitSet itemset)
Provides the support (percentage) of the given itemset by the currently
set database. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
addOption, checkGlobalParameterConstraints, deleteOption, description, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters, setParameters |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
frequencies
private Map<BitSet,Integer> frequencies
- Keeps the frequencies of itemset that have already been encountered.
FrequencyDependentItemsetDistanceFunction
protected FrequencyDependentItemsetDistanceFunction()
setDatabase
public void setDatabase(Database<BitVector> database,
boolean verbose,
boolean time)
- Sets the database, initializes a new map of frequencies.
- Specified by:
setDatabase
in interface MeasurementFunction<BitVector,DoubleDistance>
- Overrides:
setDatabase
in class AbstractMeasurementFunction<BitVector,DoubleDistance>
- Parameters:
database
- the database to be setverbose
- flag to allow verbose messages while performing the methodtime
- flag to request output of performance time- See Also:
MeasurementFunction.setDatabase(de.lmu.ifi.dbs.elki.database.Database,
boolean, boolean)
support
protected double support(BitSet itemset)
- Provides the support (percentage) of the given itemset by the currently
set database.
- Parameters:
itemset
- the itemset to compute the support
- Returns:
- the support (percentage) of the given itemset by the currently
set database