A hierarchical clustering library for Cytological profiling projects written in rust
This is a submodule that will be used for HistDiff Processor to generate HistDiff heatmaps.
- Linkages:
- Complete Linkage
- Single Linkage
- Average Linkage
- Metrics/Matrices:
- Distance
- Pearson Correlation
- Dendrogram as json
- Row and column ordering
create_hierarchy(
raw_data: &[Vec<f64>],
mat_metric: Metric,
link_method: LinkageMethod,
) -> Result<ClusterHierarchy, Box<dyn Error>>
- This function takes a
&[Vec<f64>]
and creates aClusterHierarchy
struct that stores the clustering output.
create_hierarchy_from_df(
df: &DataFrame,
mat_metric: Metric,
link_method: LinkageMethod,
ignore_cols: &Option<Vec<usize>>,
) -> Result<ClusterHierarchy, Box<dyn Error>> {
- This is the same main function except it converts a polars dataframe into a hierarchy
Run cargo doc --open
- Implement clustering foundation
- Implement Agglomerative clustering
- Implement similarity/distance calculations
- Use native vectors instead of ndarray
- Implement Distance matrix calculation
- Implement Pearson similarity matrix
- Implement tree outputs
- Output tree JSON
- Output simple JSON output
- Output leaf orderings
- Output dendrogram nodes themselves