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 double[] |
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.
|
relation, storage
Constructor and Description |
---|
DiSHPreferenceVectorIndex(Relation<V> relation,
double[] epsilon,
int minpts,
DiSHPreferenceVectorIndex.Strategy strategy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private long[] |
determinePreferenceVector(Relation<V> relation,
ModifiableDBIDs[] neighborIDs,
java.lang.StringBuilder msg)
Determines the preference vector according to the specified neighbor ids.
|
private long[] |
determinePreferenceVectorByApriori(Relation<V> relation,
ModifiableDBIDs[] neighborIDs,
java.lang.StringBuilder msg)
Determines the preference vector with the apriori strategy.
|
private long[] |
determinePreferenceVectorByMaxIntersection(ModifiableDBIDs[] neighborIDs,
java.lang.StringBuilder msg)
Determines the preference vector with the max intersection strategy.
|
protected Logging |
getLogger()
Get the classes static logger.
|
java.lang.String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
java.lang.String |
getShortName()
A short name for the result, useful for file names.
|
void |
initialize()
Initialize the index.
|
private RangeQuery<V>[] |
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(java.util.Map<java.lang.Integer,ModifiableDBIDs> candidates)
Returns the set with the maximum size contained in the specified map.
|
private int |
maxIntersection(java.util.Map<java.lang.Integer,ModifiableDBIDs> candidates,
ModifiableDBIDs set)
Returns the index of the set having the maximum intersection set with the
specified set contained in the specified map.
|
getPreferenceVector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPreferenceVector
private static final Logging LOG
protected double[] epsilon
protected int minpts
protected DiSHPreferenceVectorIndex.Strategy strategy
public DiSHPreferenceVectorIndex(Relation<V> relation, double[] epsilon, int minpts, DiSHPreferenceVectorIndex.Strategy strategy)
relation
- Relation to useepsilon
- Epsilon valueminpts
- MinPts valuestrategy
- Strategypublic void initialize()
Index
initialize
in interface Index
private long[] determinePreferenceVector(Relation<V> relation, ModifiableDBIDs[] neighborIDs, java.lang.StringBuilder msg)
relation
- the database storing the objectsneighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messagesprivate long[] determinePreferenceVectorByApriori(Relation<V> relation, ModifiableDBIDs[] neighborIDs, java.lang.StringBuilder msg)
relation
- the database storing the objectsneighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messagesprivate long[] determinePreferenceVectorByMaxIntersection(ModifiableDBIDs[] neighborIDs, java.lang.StringBuilder msg)
neighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messagesprivate int max(java.util.Map<java.lang.Integer,ModifiableDBIDs> candidates)
candidates
- the map containing the setsprivate int maxIntersection(java.util.Map<java.lang.Integer,ModifiableDBIDs> candidates, ModifiableDBIDs set)
candidates
- the map containing the setsset
- the set to intersect with and output the result toprivate RangeQuery<V>[] initRangeQueries(Relation<V> relation, int dimensionality)
relation
- the database storing the objectsdimensionality
- the dimensionality of the objectsprotected Logging getLogger()
AbstractPreprocessorIndex
getLogger
in class AbstractPreprocessorIndex<V extends NumberVector,long[]>
public java.lang.String getLongName()
Result
getLongName
in interface Result
public java.lang.String getShortName()
Result
getShortName
in interface Result
public void logStatistics()
Index
logStatistics
in interface Index
Copyright © 2019 ELKI Development Team. License information.