|
|
|||||||||||||||||||||
| 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.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.preprocessing.DiSHPreprocessor<V,N>
public class DiSHPreprocessor<V extends RealVector<V,N>,N extends Number>
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 vecrtor. |
| 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 String |
EPSILON_D
Description for parameter epsilon. |
static String |
EPSILON_P
Option string for parameter epsilon. |
private int |
minpts
Threshold for minimum number of points in the neighborhood. |
static String |
MINPTS_D
Description for parameter minimum points. |
static String |
MINPTS_P
Parameter minimum points. |
private DiSHPreprocessor.Strategy |
strategy
The strategy to determine the preference vector. |
static String |
STRATEGY_D
Description for parameter strategy. |
static String |
STRATEGY_P
Parameter strategy. |
| Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
optionHandler |
| Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debug |
| Constructor Summary | |
|---|---|
DiSHPreprocessor()
Provides a new AdvancedHiSCPreprocessor that computes the preference vector of objects of a certain database. |
|
| Method Summary | |
|---|---|
String |
description()
Returns a description of the class and the required parameters. |
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<N,V>[] |
initDistanceFunctions(Database<V> database,
int dimensionality,
boolean verbose,
boolean time)
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 actual preprocessing step of this Preprocessor for the objects of the specified database. |
String[] |
setParameters(String[] args)
Sets the attributes of the class accordingly to the given parameters. |
| Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters |
| Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
|---|
checkGlobalParameterConstraints, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription |
| Field Detail |
|---|
public static final DoubleDistance DEFAULT_EPSILON
public static final String EPSILON_P
public static String EPSILON_D
public static final String MINPTS_P
private static final String CONDITION
public static final String MINPTS_D
public static final String STRATEGY_P
public static DiSHPreprocessor.Strategy DEFAULT_STRATEGY
public static final String STRATEGY_D
private DoubleDistance[] epsilon
private int minpts
private DiSHPreprocessor.Strategy strategy
| Constructor Detail |
|---|
public DiSHPreprocessor()
| Method Detail |
|---|
public void run(Database<V> database,
boolean verbose,
boolean time)
Preprocessor
run in interface Preprocessor<V extends RealVector<V,N>>database - the database for which the preprocessing is performedverbose - flag to allow verbose messages while performing the algorithmtime - flag to request output of performance timePreprocessor.run(de.lmu.ifi.dbs.elki.database.Database,boolean,boolean)public String description()
Parameterizable
description in interface Parameterizabledescription in class AbstractParameterizableParameterizable.description()
public String[] setParameters(String[] args)
throws ParameterException
Parameterizable
setParameters in interface ParameterizablesetParameters in class AbstractParameterizableargs - parameters to set the attributes accordingly to
ParameterException - in case of wrong parameter-settingParameterizable.setParameters(String[])
private 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<N,V>[] initDistanceFunctions(Database<V> database,
int dimensionality,
boolean verbose,
boolean time)
throws ParameterException
database - the database storing the objectsdimensionality - the dimensionality of the objectsverbose - flag to allow verbose messages while performing the algorithmtime - flag to request output of performance time
ParameterExceptionpublic DoubleDistance[] getEpsilon()
public int getMinpts()
|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||