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.
|
storage
relation
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,
StringBuilder msg)
Determines the preference vector according to the specified neighbor ids.
|
private long[] |
determinePreferenceVectorByApriori(Relation<V> relation,
ModifiableDBIDs[] neighborIDs,
StringBuilder msg)
Determines the preference vector with the apriori strategy.
|
private long[] |
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>[] |
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.
|
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, 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, 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, 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>[] 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 String getLongName()
Result
getLongName
in interface Result
getLongName
in class AbstractIndex<V extends NumberVector>
public String getShortName()
Result
getShortName
in interface Result
getShortName
in class AbstractIndex<V extends NumberVector>
public void logStatistics()
Index
logStatistics
in interface Index
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.