
V - Vector type@Description(value="Computes the preference vector of objects of a certain database according to the DiSH algorithm.") public class DiSHPreferenceVectorIndex<V extends NumberVector<?>> extends AbstractPreferenceVectorIndex<V> implements PreferenceVectorIndex<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
DiSHPreferenceVectorIndex.Factory<V extends NumberVector<?>>
Factory class.
|
static class |
DiSHPreferenceVectorIndex.Strategy
Available strategies for determination of the preference vector.
|
| Modifier and Type | Field and Description |
|---|---|
protected DoubleDistance[] |
epsilon
The epsilon value for each dimension.
|
private static Logging |
LOG
Logger to use.
|
protected int |
minpts
Threshold for minimum number of points in the neighborhood.
|
protected DiSHPreferenceVectorIndex.Strategy |
strategy
The strategy to determine the preference vector.
|
storagerelation| Constructor and Description |
|---|
DiSHPreferenceVectorIndex(Relation<V> relation,
DoubleDistance[] epsilon,
int minpts,
DiSHPreferenceVectorIndex.Strategy strategy)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private BitSet |
determinePreferenceVector(Relation<V> relation,
ModifiableDBIDs[] neighborIDs,
StringBuilder msg)
Determines the preference vector according to the specified neighbor ids.
|
private BitSet |
determinePreferenceVectorByApriori(Relation<V> relation,
ModifiableDBIDs[] neighborIDs,
StringBuilder msg)
Determines the preference vector with the apriori strategy.
|
private BitSet |
determinePreferenceVectorByMaxIntersection(ModifiableDBIDs[] neighborIDs,
StringBuilder msg)
Determines the preference vector with the max intersection strategy.
|
protected Logging |
getLogger()
Get the classes static logger.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
String |
getShortName()
A short name for the result, useful for file names.
|
void |
initialize()
Initialize the index.
|
private RangeQuery<V,DoubleDistance>[] |
initRangeQueries(Relation<V> relation,
int dimensionality)
Initializes the dimension selecting distancefunctions to determine the
preference vectors.
|
void |
logStatistics()
Send statistics to the logger, if enabled.
|
private int |
max(Map<Integer,ModifiableDBIDs> candidates)
Returns the set with the maximum size contained in the specified map.
|
private int |
maxIntersection(Map<Integer,ModifiableDBIDs> candidates,
DBIDs set,
ModifiableDBIDs result)
Returns the index of the set having the maximum intersection set with the
specified set contained in the specified map.
|
getPreferenceVectorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPreferenceVectorprivate static final Logging LOG
protected DoubleDistance[] epsilon
protected int minpts
protected DiSHPreferenceVectorIndex.Strategy strategy
public DiSHPreferenceVectorIndex(Relation<V> relation, DoubleDistance[] epsilon, int minpts, DiSHPreferenceVectorIndex.Strategy strategy)
relation - Relation to useepsilon - Epsilon valueminpts - MinPts valuestrategy - Strategypublic void initialize()
Indexinitialize in interface Indexprivate BitSet determinePreferenceVector(Relation<V> relation, ModifiableDBIDs[] neighborIDs, StringBuilder msg) throws UnableToComplyException
relation - the database storing the objectsneighborIDs - the list of ids of the neighbors in each dimensionmsg - a string buffer for debug messagesUnableToComplyExceptionprivate BitSet determinePreferenceVectorByApriori(Relation<V> relation, ModifiableDBIDs[] neighborIDs, StringBuilder msg) throws UnableToComplyException
relation - the database storing the objectsneighborIDs - the list of ids of the neighbors in each dimensionmsg - a string buffer for debug messagesUnableToComplyExceptionprivate BitSet determinePreferenceVectorByMaxIntersection(ModifiableDBIDs[] neighborIDs, StringBuilder msg)
neighborIDs - the list of ids of the neighbors in each dimensionmsg - a string buffer for debug messagesprivate int max(Map<Integer,ModifiableDBIDs> candidates)
candidates - the map containing the setsprivate int maxIntersection(Map<Integer,ModifiableDBIDs> candidates, DBIDs set, ModifiableDBIDs result)
candidates - the map containing the setsset - the set to intersect withresult - the set to put the result inprivate RangeQuery<V,DoubleDistance>[] initRangeQueries(Relation<V> relation, int dimensionality)
relation - the database storing the objectsdimensionality - the dimensionality of the objectsprotected Logging getLogger()
AbstractPreprocessorIndexgetLogger in class AbstractPreprocessorIndex<V extends NumberVector<?>,BitSet>public String getLongName()
ResultgetLongName in interface ResultgetLongName in class AbstractIndex<V extends NumberVector<?>>public String getShortName()
ResultgetShortName in interface ResultgetShortName in class AbstractIndex<V extends NumberVector<?>>public void logStatistics()
IndexlogStatistics in interface Index