public class LSDBC extends ClustererBase implements Parameterized
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ALPHA
4.0 is the default scale value used when performing clustering.
|
static int |
DEFAULT_NEIGHBORS
15 is the default number of neighbors used when performing clustering
|
Constructor and Description |
---|
LSDBC()
Creates a new LSDBC clustering object using the
EuclideanDistance
and default parameter values. |
LSDBC(DistanceMetric dm)
Creates a new LSDBC clustering object using the given distance metric
|
LSDBC(DistanceMetric dm,
double alpha)
Creates a new LSDBC clustering object using the given distance metric
|
LSDBC(DistanceMetric dm,
double alpha,
int neighbors)
Creates a new LSDBC clustering object using the given distance metric
|
LSDBC(LSDBC toCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
LSDBC |
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.
|
double |
getAlpha()
Returns the scale value that will control how many points are added to a
cluster.
|
int |
getNeighbors()
Returns the number of neighbors that will be considered when clustering
data points
|
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.
|
void |
setAlpha(double alpha)
Sets the scale value that will control how many points are added to a
cluster.
|
void |
setDistanceMetric(DistanceMetric dm)
Sets the distance metric used when performing clustering.
|
void |
setNeighbors(int neighbors)
Sets the number of neighbors that will be considered when clustering
data points
|
void |
setVectorCollectionFactory(VectorCollectionFactory<VecPaired<Vec,Integer>> vectorCollectionFactory)
Sets the vector collection factory used for acceleration of neighbor searches.
|
cluster, cluster, createClusterListFromAssignmentArray, getDatapointsFromCluster, supportsWeightedData
public static final int DEFAULT_NEIGHBORS
setNeighbors(int)
,
Constant Field Valuespublic static final double DEFAULT_ALPHA
setAlpha(double)
,
Constant Field Valuespublic LSDBC(DistanceMetric dm, double alpha, int neighbors)
dm
- the distance metric to usealpha
- the scale factor to use when forming clustersneighbors
- the number of neighbors to consider when determining clusterspublic LSDBC(DistanceMetric dm, double alpha)
dm
- the distance metric to usealpha
- the scale factor to use when forming clusterspublic LSDBC(DistanceMetric dm)
dm
- the distance metric to usepublic LSDBC()
EuclideanDistance
and default parameter values.public LSDBC(LSDBC toCopy)
toCopy
- the object to copypublic void setVectorCollectionFactory(VectorCollectionFactory<VecPaired<Vec,Integer>> vectorCollectionFactory)
vectorCollectionFactory
- the vector collection factory to usepublic void setDistanceMetric(DistanceMetric dm)
dm
- the distance metric to use.public void setNeighbors(int neighbors)
neighbors
- the number of neighbors the algorithm will usepublic int getNeighbors()
public void setAlpha(double alpha)
alpha
- the scale value to usepublic double getAlpha()
public 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 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 LSDBC clone()
clone
in interface Clusterer
clone
in class ClustererBase
Copyright © 2017. All rights reserved.