|
|
|||||||||||||||||||||
| 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>
V - Vector typeN - Number typepublic 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 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
Parameter Epsilon. |
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 |
protected IntParameter |
MINPTS_PARAM
Parameter Minpts. |
private DiSHPreprocessor.Strategy |
strategy
The strategy to determine the preference vector. |
static OptionID |
STRATEGY_ID
OptionID for STRATEGY_PARAM |
private PatternParameter |
STRATEGY_PARAM
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, logger |
| Constructor Summary | |
|---|---|
DiSHPreprocessor()
Provides a new AdvancedHiSCPreprocessor that computes the preference vector of objects of a certain database. |
|
| 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<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. |
List<String> |
setParameters(List<String> args)
Grabs all specified options from the option handler. |
String |
shortDescription()
Returns a short description of the class. |
| Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable |
| 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 |
| Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
|---|
checkGlobalParameterConstraints, collectOptions, getParameters |
| Field Detail |
|---|
public static final DoubleDistance DEFAULT_EPSILON
public static final OptionID EPSILON_ID
EPSILON_PARAM
public static final String MINPTS_P
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
private DoubleDistance[] epsilon
protected final IntParameter MINPTS_PARAM
private int minpts
private final PatternParameter STRATEGY_PARAM
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 timepublic String shortDescription()
AbstractParameterizable
shortDescription in interface ParameterizableshortDescription in class AbstractParameterizable
public List<String> setParameters(List<String> args)
throws ParameterException
AbstractParameterizable
{
List remainingParameters = super.setParameters(args);
// set parameters for your class
// for example like this:
if(isSet(MY_PARAM_VALUE_PARAM))
{
myParamValue = getParameterValue(MY_PARAM_VALUE_PARAM);
}
.
.
.
return remainingParameters;
// or in case of attributes requesting parameters themselves
// return parameterizableAttribbute.setParameters(remainingParameters);
}
setParameters in interface ParameterizablesetParameters in class AbstractParameterizableargs - parameters to set the attributes accordingly to
ParameterException - in case of wrong parameter-setting
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 | |||||||||||