MCPcopy Create free account
hub / github.com/Open-Quant/openquant / check_improve_clusters

Function check_improve_clusters

crates/openquant/src/onc.rs:28–39  ·  view source on GitHub ↗
(
    new_tstat_mean: f64,
    mean_redo_tstat: f64,
    old_cluster: T,
    new_cluster: T,
)

Source from the content-addressed store, hash-verified

26}
27
28pub fn check_improve_clusters<T: Clone>(
29 new_tstat_mean: f64,
30 mean_redo_tstat: f64,
31 old_cluster: T,
32 new_cluster: T,
33) -> T {
34 if new_tstat_mean > mean_redo_tstat {
35 old_cluster
36 } else {
37 new_cluster
38 }
39}
40
41pub fn get_onc_clusters(corr_mat: &DMatrix<f64>, repeat: usize) -> Result<OncResult, OncError> {
42 if repeat == 0 {

Callers 1

cluster_kmeans_topFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected