Package moa.cluster
Class Clustering
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.cluster.Clustering
-
- All Implemented Interfaces:
Serializable
,MOAObject
public class Clustering extends AbstractMOAObject
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Clustering()
Clustering(ArrayList<DataPoint> points, double overlapThreshold, int initMinPoints)
Clustering(List<? extends Instance> points)
Clustering(Cluster[] clusters)
Clustering(AutoExpandVector<Cluster> clusters)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Cluster cluster)
add a cluster to the clusteringstatic HashMap<Integer,Integer>
classValues(List<? extends Instance> points)
int
dimension()
Cluster
get(int index)
get a cluster from the clusteringAutoExpandVector<Cluster>
getClustering()
AutoExpandVector<Cluster>
getClusteringCopy()
void
getDescription(StringBuilder sb, int i)
Returns a string representation of this object.double
getMaxInclusionProbability(Instance point)
void
remove(int index)
remove a cluster from the clusteringint
size()
-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
-
-
-
Constructor Detail
-
Clustering
public Clustering()
-
Clustering
public Clustering(Cluster[] clusters)
-
Clustering
public Clustering(ArrayList<DataPoint> points, double overlapThreshold, int initMinPoints)
-
Clustering
public Clustering(AutoExpandVector<Cluster> clusters)
-
-
Method Detail
-
classValues
public static HashMap<Integer,Integer> classValues(List<? extends Instance> points)
- Parameters:
points
-- Returns:
- an array with the min and max class label value
-
add
public void add(Cluster cluster)
add a cluster to the clustering
-
remove
public void remove(int index)
remove a cluster from the clustering
-
get
public Cluster get(int index)
get a cluster from the clustering
-
getClustering
public AutoExpandVector<Cluster> getClustering()
- Returns:
- the
Clustering
as an AutoExpandVector
-
getClusteringCopy
public AutoExpandVector<Cluster> getClusteringCopy()
- Returns:
- A deepcopy of the
Clustering
as an AutoExpandVector
-
size
public int size()
- Returns:
- the number of clusters
-
dimension
public int dimension()
- Returns:
- the number of dimensions of this clustering
-
getDescription
public void getDescription(StringBuilder sb, int i)
Description copied from interface:MOAObject
Returns a string representation of this object. Used inAbstractMOAObject.toString
to give a string representation of the object.- Parameters:
sb
- the stringbuilder to add the descriptioni
- the number of characters to indent
-
getMaxInclusionProbability
public double getMaxInclusionProbability(Instance point)
-
-