@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;
|
protected static Logging |
logger
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,
DoubleDistance[] epsilon,
int minpts,
DiSHPreferenceVectorIndex.Strategy strategy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private BitSet |
determinePreferenceVector(Relation<V> relation,
ModifiableDBIDs[] neighborIDs,
StringBuffer msg)
Determines the preference vector according to the specified neighbor ids.
|
private BitSet |
determinePreferenceVectorByApriori(Relation<V> relation,
ModifiableDBIDs[] neighborIDs,
StringBuffer msg)
Determines the preference vector with the apriori strategy.
|
private BitSet |
determinePreferenceVectorByMaxIntersection(ModifiableDBIDs[] neighborIDs,
StringBuffer 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.
|
private RangeQuery<V,DoubleDistance>[] |
initRangeQueries(Relation<V> relation,
int dimensionality)
Initializes the dimension selecting distancefunctions to determine the
preference vectors.
|
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.
|
protected void |
preprocess()
Preprocessing step.
|
getPreferenceVector
delete, deleteAll, getPageFileStatistics, insert, insertAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPreferenceVector
protected static final Logging logger
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
- Strategyprotected void preprocess()
AbstractPreferenceVectorIndex
preprocess
in class AbstractPreferenceVectorIndex<V extends NumberVector<?,?>>
private BitSet determinePreferenceVector(Relation<V> relation, ModifiableDBIDs[] neighborIDs, StringBuffer msg) throws ParameterException, UnableToComplyException
relation
- the database storing the objectsneighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messagesParameterException
UnableToComplyException
private BitSet determinePreferenceVectorByApriori(Relation<V> relation, ModifiableDBIDs[] neighborIDs, StringBuffer msg) throws ParameterException, UnableToComplyException
relation
- the database storing the objectsneighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messagesParameterException
UnableToComplyException
private BitSet determinePreferenceVectorByMaxIntersection(ModifiableDBIDs[] neighborIDs, StringBuffer 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) throws ParameterException
relation
- the database storing the objectsdimensionality
- the dimensionality of the objectsParameterException
protected Logging getLogger()
AbstractPreprocessorIndex
getLogger
in class AbstractPreprocessorIndex<V extends NumberVector<?,?>,BitSet>
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<?,?>>