public class GridCluster extends NonConvexCluster
LS, N, radiusFactor, SS
Constructor and Description |
---|
GridCluster(CFCluster cluster,
List<CFCluster> microclusters,
HashMap<DensityGrid,Boolean> hashMap,
int label) |
GridCluster(CFCluster cluster,
List<CFCluster> microclusters,
int label) |
Modifier and Type | Method and Description |
---|---|
void |
absorbCluster(GridCluster gridClus) |
void |
addGrid(DensityGrid dg) |
int |
getClusterLabel() |
void |
getDescription(StringBuilder sb,
int indent)
Returns a string representation of this object.
|
HashMap<DensityGrid,Boolean> |
getGrids() |
double |
getInclusionProbability(Instance instance)
Iterates through the DensityGrids in the cluster and calculates the inclusion probability for each.
|
double |
getWeight()
See interface
Cluster |
boolean |
isConnected()
Tests a grid cluster for connectedness according to Definition 3.4, Grid Group, from
Chen and Tu 2007.
|
Boolean |
isInside(DensityGrid dg)
Inside Grids are defined in Definition 3.5 of Chen and Tu 2007 as:
Consider a grid group G and a grid g ∈ G, suppose g =(j1, ··· ,jd), if g has
neighboring grids in every dimension i =1, ·· · ,d, then g is an inside grid
in G.Otherwise g is an outside grid in G.
|
Boolean |
isInside(DensityGrid dg,
DensityGrid dgH)
Inside Grids are defined in Definition 3.5 of Chen and Tu 2007 as:
Consider a grid group G and a grid g ∈ G, suppose g =(j1, ··· ,jd), if g has
neighboring grids in every dimension i =1, ·· · ,d, then g is an inside grid
in G.
|
void |
removeGrid(DensityGrid dg) |
void |
setClusterLabel(int clusterLabel) |
String |
toString()
Returns a description of the object.
|
getCF, getClustering, getMicroClusters, getRadius, insert, remove
combine, getCenterDistance, getCenterDistance, getClusterSpecificInfo, getDistanceVector, getDistanceVector, getHullDistance, merge, overlapRadiusDegree, overlapSave, sample, setCenter, setRadius, setWeight
getGroundTruth, getId, getInfo, getMeasureValue, isGroundTruth, setGroundTruth, setId, setMeasureValue, setMeasureValue
copy, copy, measureByteSize, measureByteSize
public void addGrid(DensityGrid dg)
dg
- the density grid to add to the clusterpublic void removeGrid(DensityGrid dg)
dg
- the density grid to remove from the clusterpublic void absorbCluster(GridCluster gridClus)
gridClus
- the GridCluster to be absorbed into this clusterpublic Boolean isInside(DensityGrid dg)
dg
- the density grid to label as being inside or outpublic Boolean isInside(DensityGrid dg, DensityGrid dgH)
dg
- the density grid being labelled as inside or outsidedgH
- the density grid being proposed for additionpublic int getClusterLabel()
public HashMap<DensityGrid,Boolean> getGrids()
public void setClusterLabel(int clusterLabel)
clusterLabel
- the class label to assign to the clusterpublic void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
getDescription
in class Cluster
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic double getWeight()
CFCluster
Cluster
getWeight
in class CFCluster
Cluster.getWeight()
public boolean isConnected()
public double getInclusionProbability(Instance instance)
getInclusionProbability
in class NonConvexCluster
public String toString()
AbstractMOAObject
toString
in class AbstractMOAObject
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.