|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.preprocessing.DiSHPreprocessor<V>
V
- Vector type@Description(value="Computes the preference vector of objects of a certain database according to the DiSH algorithm.") public class DiSHPreprocessor<V extends NumberVector<V,?>>
Preprocessor for DiSH preference vector assignment to objects of a certain database.
Nested Class Summary | |
---|---|
static class |
DiSHPreprocessor.Strategy
Available strategies for determination of the preference vector. |
Field Summary | |
---|---|
private static String |
CONDITION
Description for the determination of the preference vector. |
static DoubleDistance |
DEFAULT_EPSILON
The default value for epsilon. |
static DiSHPreprocessor.Strategy |
DEFAULT_STRATEGY
Default strategy. |
private DoubleDistance[] |
epsilon
The epsilon value for each dimension; |
static OptionID |
EPSILON_ID
OptionID for EPSILON_PARAM |
protected DoubleListParameter |
EPSILON_PARAM
A comma separated list of positive doubles specifying the maximum radius of the neighborhood to be considered in each dimension for determination of the preference vector (default is DEFAULT_EPSILON in each
dimension). |
private int |
minpts
Threshold for minimum number of points in the neighborhood. |
static OptionID |
MINPTS_ID
OptionID for MINPTS_PARAM |
static String |
MINPTS_P
Option name for MINPTS_ID . |
protected IntParameter |
MINPTS_PARAM
Positive threshold for minimum numbers of points in the epsilon-neighborhood of a point, must satisfy following CONDITION . |
private DiSHPreprocessor.Strategy |
strategy
The strategy to determine the preference vector. |
static OptionID |
STRATEGY_ID
OptionID for STRATEGY_PARAM |
private StringParameter |
STRATEGY_PARAM
The strategy for determination of the preference vector, available strategies are: DiSHPreprocessor.Strategy.APRIORI and
DiSHPreprocessor.Strategy.MAX_INTERSECTION . |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
DiSHPreprocessor(Parameterization config)
Constructor, adhering to Parameterizable |
Method Summary | |
---|---|
private BitSet |
determinePreferenceVector(Database<V> database,
Set<Integer>[] neighborIDs,
StringBuffer msg)
Determines the preference vector according to the specified neighbor ids. |
private BitSet |
determinePreferenceVectorByApriori(Database<V> database,
Set<Integer>[] neighborIDs,
StringBuffer msg)
Determines the preference vector with the apriori strategy. |
private BitSet |
determinePreferenceVectorByMaxIntersection(Set<Integer>[] neighborIDs,
StringBuffer msg)
Determines the preference vector with the max intersection strategy. |
DoubleDistance[] |
getEpsilon()
Returns the value of the epsilon parameter. |
int |
getMinpts()
Returns minpts. |
private DimensionSelectingDistanceFunction<V>[] |
initDistanceFunctions(Database<V> database,
int dimensionality)
Initializes the dimension selecting distancefunctions to determine the preference vectors. |
private int |
max(Map<Integer,Set<Integer>> candidates)
Returns the set with the maximum size contained in the specified map. |
private int |
maxIntersection(Map<Integer,Set<Integer>> candidates,
Set<Integer> set,
Set<Integer> result)
Returns the index of the set having the maximum intersection set with the specified set contained in the specified map. |
void |
run(Database<V> database,
boolean verbose,
boolean time)
This method executes the particular preprocessing step of this Preprocessor for the objects of the specified database. |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DoubleDistance DEFAULT_EPSILON
public static final OptionID EPSILON_ID
EPSILON_PARAM
public static final String MINPTS_P
MINPTS_ID
.
private static final String CONDITION
public static final OptionID MINPTS_ID
MINPTS_PARAM
public static DiSHPreprocessor.Strategy DEFAULT_STRATEGY
public static final OptionID STRATEGY_ID
STRATEGY_PARAM
protected final DoubleListParameter EPSILON_PARAM
DEFAULT_EPSILON
in each
dimension). If only one value is specified, this value will be used for
each dimension.
Key: -dish.epsilon
Default value: DEFAULT_EPSILON
private DoubleDistance[] epsilon
protected final IntParameter MINPTS_PARAM
CONDITION
.
Key: -dish.minpts
private int minpts
private final StringParameter STRATEGY_PARAM
DiSHPreprocessor.Strategy.APRIORI
and
DiSHPreprocessor.Strategy.MAX_INTERSECTION
.
Key: -dish.strategy
Default value: DEFAULT_STRATEGY
private DiSHPreprocessor.Strategy strategy
Constructor Detail |
---|
public DiSHPreprocessor(Parameterization config)
Parameterizable
config
- ParameterizationMethod Detail |
---|
public void run(Database<V> database, boolean verbose, boolean time)
Preprocessor
run
in interface Preprocessor<V extends NumberVector<V,?>>
database
- the database for which the preprocessing is performedverbose
- flag to allow verbose messages while performing the
algorithmtime
- flag to request output of performance timeprivate BitSet determinePreferenceVector(Database<V> database, Set<Integer>[] neighborIDs, StringBuffer msg) throws ParameterException, UnableToComplyException
database
- the database storing the objectsneighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messages
ParameterException
UnableToComplyException
private BitSet determinePreferenceVectorByApriori(Database<V> database, Set<Integer>[] neighborIDs, StringBuffer msg) throws ParameterException, UnableToComplyException
database
- the database storing the objectsneighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messages
ParameterException
UnableToComplyException
private BitSet determinePreferenceVectorByMaxIntersection(Set<Integer>[] neighborIDs, StringBuffer msg)
neighborIDs
- the list of ids of the neighbors in each dimensionmsg
- a string buffer for debug messages
private int max(Map<Integer,Set<Integer>> candidates)
candidates
- the map containing the sets
private int maxIntersection(Map<Integer,Set<Integer>> candidates, Set<Integer> set, Set<Integer> result)
candidates
- the map containing the setsset
- the set to intersect withresult
- the set to put the result in
private DimensionSelectingDistanceFunction<V>[] initDistanceFunctions(Database<V> database, int dimensionality) throws ParameterException
database
- the database storing the objectsdimensionality
- the dimensionality of the objects
ParameterException
public DoubleDistance[] getEpsilon()
public int getMinpts()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |