public class HierarchicalShortPathAssigner extends Object implements SoftAssigner<short[],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<short[]>,HardAssigner<short[],float[],IntFloatPair>> |
assigners |
protected HierarchicalShortKMeansResult |
result |
| Constructor and Description |
|---|
HierarchicalShortPathAssigner(HierarchicalShortKMeansResult result)
Construct with the given
HierarchicalShortKMeansResult instance. |
| Modifier and Type | Method and Description |
|---|---|
int[] |
assign(short[] data)
Assign a single point to some clusters.
|
int[][] |
assign(short[][] data)
Assign data to clusters.
|
IndependentPair<int[],float[]> |
assignWeighted(short[] data)
Assign a single point to some clusters.
|
void |
assignWeighted(short[][] 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 HierarchicalShortKMeansResult result
protected Map<CentroidsProvider<short[]>,HardAssigner<short[],float[],IntFloatPair>> assigners
public HierarchicalShortPathAssigner(HierarchicalShortKMeansResult result)
HierarchicalShortKMeansResult instance.result - the HierarchicalShortKMeansResult instance.public int[][] assign(short[][] data)
SoftAssignerassign in interface SoftAssigner<short[],float[]>data - the data.public int[] assign(short[] data)
SoftAssignerassign in interface SoftAssigner<short[],float[]>data - datum to assign.public void assignWeighted(short[][] data, int[][] assignments, float[][] weights)
SoftAssignerassignWeighted in interface SoftAssigner<short[],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(short[] data)
SoftAssignerassignWeighted in interface SoftAssigner<short[],float[]>data - point to assign.public int numDimensions()
AssignernumDimensions in interface Assigner<short[]>public int size()
SoftAssignersize in interface SoftAssigner<short[],float[]>