hessboost 0.2.2

Fast, deterministic gradient boosting (GBDT) in Rust: conformal intervals, explainable boosting machines, distributional boosting, tree-based diffusion, and XGBoost model interchange
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/// Bit patterns of the values, preserving signed zero and NaN payloads.
pub fn bits(values: impl AsRef<[f32]>) -> Vec<u32> {
    values
        .as_ref()
        .iter()
        .map(|value| value.to_bits())
        .collect()
}

/// Whether two slices contain the same `f32` bit patterns.
pub fn same_bits(a: &[f32], b: &[f32]) -> bool {
    a.len() == b.len() && a.iter().zip(b).all(|(x, y)| x.to_bits() == y.to_bits())
}