public class HierarchicalLongPathAssigner extends Object implements SoftAssigner<long[],double[]>
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<long[]>,HardAssigner<long[],double[],IntDoublePair>> |
assigners |
protected HierarchicalLongKMeansResult |
result |
| Constructor and Description |
|---|
HierarchicalLongPathAssigner(HierarchicalLongKMeansResult result)
Construct with the given
HierarchicalLongKMeansResult instance. |
| Modifier and Type | Method and Description |
|---|---|
int[] |
assign(long[] data)
Assign a single point to some clusters.
|
int[][] |
assign(long[][] data)
Assign data to clusters.
|
IndependentPair<int[],double[]> |
assignWeighted(long[] data)
Assign a single point to some clusters.
|
void |
assignWeighted(long[][] data,
int[][] assignments,
double[][] weights)
Assign data to clusters.
|
int |
numDimensions()
Get the number of dimensions of the input vectors.
|
int |
size()
The number of clusters.
|
protected HierarchicalLongKMeansResult result
protected Map<CentroidsProvider<long[]>,HardAssigner<long[],double[],IntDoublePair>> assigners
public HierarchicalLongPathAssigner(HierarchicalLongKMeansResult result)
HierarchicalLongKMeansResult instance.result - the HierarchicalLongKMeansResult instance.public int[][] assign(long[][] data)
SoftAssignerassign in interface SoftAssigner<long[],double[]>data - the data.public int[] assign(long[] data)
SoftAssignerassign in interface SoftAssigner<long[],double[]>data - datum to assign.public void assignWeighted(long[][] data, int[][] assignments, double[][] weights)
SoftAssignerassignWeighted in interface SoftAssigner<long[],double[]>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[],double[]> assignWeighted(long[] data)
SoftAssignerassignWeighted in interface SoftAssigner<long[],double[]>data - point to assign.public int numDimensions()
AssignernumDimensions in interface Assigner<long[]>public int size()
SoftAssignersize in interface SoftAssigner<long[],double[]>