public class OPTICS extends ClustererBase implements Parameterized
DBSCAN
. OPTICS creates an ordering of the ports, and then clusters
can be extracted from this ordering in numerous different ways.
Modifier and Type | Class and Description |
---|---|
static class |
OPTICS.ExtractionMethod
Enum to indicate which method of extracting clusters should be used on
the reachability plot.
|
Modifier and Type | Field and Description |
---|---|
static OPTICS.ExtractionMethod |
DEFAULT_EXTRACTION_METHOD
The default method used to extract clusters in OPTICS
|
static int |
DEFAULT_MIN_POINTS
The default number of points to consider is 10.
|
static double |
DEFAULT_XI
The default value for xi is 0.005
|
Constructor and Description |
---|
OPTICS()
Creates a new OPTICS cluster object.
|
OPTICS(DistanceMetric dm,
int minPts)
Creates a new OPTICS cluster object.
|
OPTICS(DistanceMetric dm,
int minPts,
double xi)
Creates a new OPTICS cluster object.
|
OPTICS(int minPts)
Creates a new OPTICS cluster object.
|
OPTICS(OPTICS toCopy) |
Modifier and Type | Method and Description |
---|---|
OPTICS |
clone() |
int[] |
cluster(DataSet dataSet,
ExecutorService threadpool,
int[] designations)
Performs clustering on the given data set.
|
int[] |
cluster(DataSet dataSet,
int[] designations)
Performs clustering on the given data set.
|
DistanceMetric |
getDistanceMetric()
Returns the distance metric used to compute distances in the algorithm.
|
OPTICS.ExtractionMethod |
getExtractionMethod()
Returns the method used to extract clusters from the reachability plot.
|
int |
getMinPts()
Sets the minimum number of points needed to compute the core distance.
|
Parameter |
getParameter(String paramName)
Returns the parameter with the given name.
|
List<Parameter> |
getParameters()
Returns the list of parameters that can be altered for this learner.
|
double[] |
getReachabilityArray()
Returns a copy of the reachability array in correct reachability order.
|
double |
getXi()
Returns the xi value used in
OPTICS.ExtractionMethod.XI_STEEP_ORIGINAL to
produce cluster results. |
void |
setDistanceMetric(DistanceMetric dm)
Sets the distance metric used to compute distances in the algorithm.
|
void |
setExtractionMethod(OPTICS.ExtractionMethod extractionMethod)
Sets the method used to extract clusters from the reachability plot.
|
void |
setMinPts(int minPts)
Sets the minimum number of points needed to compute the core distance.
|
void |
setVCF(VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
Sets the
VectorCollectionFactory used to produce acceleration
structures for the OPTICS computation. |
void |
setXi(double xi)
Sets the xi value used in
OPTICS.ExtractionMethod.XI_STEEP_ORIGINAL to
produce cluster results. |
cluster, cluster, createClusterListFromAssignmentArray, getDatapointsFromCluster, supportsWeightedData
public static final double DEFAULT_XI
public static final int DEFAULT_MIN_POINTS
public static final OPTICS.ExtractionMethod DEFAULT_EXTRACTION_METHOD
public OPTICS()
EuclideanDistance
will be used as the metric.public OPTICS(int minPts)
EuclideanDistance
will be used as the metric.minPts
- the minimum number of points for reachabilitypublic OPTICS(DistanceMetric dm, int minPts)
dm
- the distance metric to useminPts
- the minimum number of points for reachabilitypublic OPTICS(DistanceMetric dm, int minPts, double xi)
dm
- the distance metric to useminPts
- the minimum number of points for reachabilityxi
- the xi valuepublic OPTICS(OPTICS toCopy)
public List<Parameter> getParameters()
Parameterized
getParameters
in interface Parameterized
public Parameter getParameter(String paramName)
Parameterized
getParameter
in interface Parameterized
paramName
- the name of the parameter to obtainpublic OPTICS clone()
clone
in interface Clusterer
clone
in class ClustererBase
public void setDistanceMetric(DistanceMetric dm)
dm
- the distance metric to usepublic DistanceMetric getDistanceMetric()
public void setXi(double xi)
OPTICS.ExtractionMethod.XI_STEEP_ORIGINAL
to
produce cluster results.xi
- the value in the range (0, 1)ArithmeticException
- if the value is not in the appropriate rangepublic double getXi()
OPTICS.ExtractionMethod.XI_STEEP_ORIGINAL
to
produce cluster results.public void setExtractionMethod(OPTICS.ExtractionMethod extractionMethod)
extractionMethod
- the clustering methodpublic OPTICS.ExtractionMethod getExtractionMethod()
public void setMinPts(int minPts)
minPts
- the number of points to compute reachability and core distancepublic int getMinPts()
public void setVCF(VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
VectorCollectionFactory
used to produce acceleration
structures for the OPTICS computation.vcf
- the vector collection factory to usepublic int[] cluster(DataSet dataSet, int[] designations)
Clusterer
cluster
in interface Clusterer
dataSet
- the data set to perform clustering ondesignations
- the array which will contain the designated values. The array will be altered and returned by
the function. If null is given, a new array will be created and returned.public int[] cluster(DataSet dataSet, ExecutorService threadpool, int[] designations)
Clusterer
cluster
in interface Clusterer
dataSet
- the data set to perform clustering onthreadpool
- a source of threads to run tasksdesignations
- the array which will contain the designated values. The array will be altered and returned by
the function. If null is given, a new array will be created and returned.public double[] getReachabilityArray()
Double.POSITIVE_INFINITY
.Copyright © 2017. All rights reserved.