Package elki.data.synthetic.bymodel
Class GeneratorMain.AssignLabelsByDistance
- java.lang.Object
-
- elki.data.synthetic.bymodel.GeneratorMain.AssignLabelsByDistance
-
- Enclosing class:
- GeneratorMain
private class GeneratorMain.AssignLabelsByDistance extends java.lang.Object
Reassign objects in certain labels; but also always test against the model.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private double[][]
centers
Cluster centers.
-
Constructor Summary
Constructors Constructor Description AssignLabelsByDistance(ClassLabel[] labels)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private double[][]
clusterCenters(java.util.ArrayList<GeneratorInterface> generators, ClassLabel[] labels)
Compute the cluster centers for each cluster.int
getAssignment(int i, double[] p)
Assign a point to a cluster.-
Methods inherited from class elki.data.synthetic.bymodel.GeneratorMain.AssignPoint
newCluster
-
-
-
-
Constructor Detail
-
AssignLabelsByDistance
public AssignLabelsByDistance(ClassLabel[] labels)
Constructor.- Parameters:
labels
- Cluster labels
-
-
Method Detail
-
clusterCenters
private double[][] clusterCenters(java.util.ArrayList<GeneratorInterface> generators, ClassLabel[] labels)
Compute the cluster centers for each cluster.- Parameters:
generators
- Generatorslabels
- Labels (null
if not needed)- Returns:
- Cluster centers
-
getAssignment
public int getAssignment(int i, double[] p)
Description copied from class:GeneratorMain.AssignPoint
Assign a point to a cluster.- Overrides:
getAssignment
in classGeneratorMain.AssignPoint
- Parameters:
i
- Cluster numberp
- Point- Returns:
- New cluster number.
-
-