public class HierarchicalIntPathAssigner extends Object implements SoftAssigner<int[],float[]>
SoftAssigner for gathering the clusters assigned
to a point from a hierarchical clustering. The returned clusters
represent the path down the tree to the final closest leaf node.| Modifier and Type | Field and Description |
|---|---|
protected Map<CentroidsProvider<int[]>,HardAssigner<int[],float[],IntFloatPair>> |
assigners |
protected HierarchicalIntKMeansResult |
result |
| Constructor and Description |
|---|
HierarchicalIntPathAssigner(HierarchicalIntKMeansResult result)
Construct with the given
HierarchicalIntKMeansResult instance. |
| Modifier and Type | Method and Description |
|---|---|
int[] |
assign(int[] data)
Assign a single point to some clusters.
|
int[][] |
assign(int[][] data)
Assign data to clusters.
|
IndependentPair<int[],float[]> |
assignWeighted(int[] data)
Assign a single point to some clusters.
|
void |
assignWeighted(int[][] data,
int[][] assignments,
float[][] weights)
Assign data to clusters.
|
int |
numDimensions()
Get the number of dimensions of the input vectors.
|
int |
size()
The number of clusters.
|
protected HierarchicalIntKMeansResult result
protected Map<CentroidsProvider<int[]>,HardAssigner<int[],float[],IntFloatPair>> assigners
public HierarchicalIntPathAssigner(HierarchicalIntKMeansResult result)
HierarchicalIntKMeansResult instance.result - the HierarchicalIntKMeansResult instance.public int[][] assign(int[][] data)
SoftAssignerassign in interface SoftAssigner<int[],float[]>data - the data.public int[] assign(int[] data)
SoftAssignerassign in interface SoftAssigner<int[],float[]>data - datum to assign.public void assignWeighted(int[][] data, int[][] assignments, float[][] weights)
SoftAssignerassignWeighted in interface SoftAssigner<int[],float[]>data - the data.assignments - the cluster indices for each data point.weights - the weights to the for each cluster for each data point.public IndependentPair<int[],float[]> assignWeighted(int[] data)
SoftAssignerassignWeighted in interface SoftAssigner<int[],float[]>data - point to assign.public int numDimensions()
AssignernumDimensions in interface Assigner<int[]>public int size()
SoftAssignersize in interface SoftAssigner<int[],float[]>