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

Function spearman_corr

crates/openquant/src/feature_importance.rs:447–451  ·  view source on GitHub ↗
(x: &[f64], y: &[f64])

Source from the content-addressed store, hash-verified

445
446 let mut out = BTreeMap::new();
447 for (name, column) in feature_names.iter().zip(proba) {
448 let model = Column(column);
449 let mut scores = Vec::with_capacity(splits.len());
450 for (_, test) in splits {
451 // Indices up to 2^53 are exact as f64.
452 let x_test: Vec<Vec<f64>> = test.iter().map(|&i| vec![i as f64]).collect();
453 let y_test = vals(y, test);
454 let sw_test = sample_weight.map(|sw| vals(sw, test));

Callers 1

feature_pca_analysisFunction · 0.85

Calls 2

rank_descFunction · 0.85
pearson_corrFunction · 0.70

Tested by

no test coverage detected