pub fn density_or_ping_li_minimum<T: FloatExt>(
    density: Option<OpenClosedUnit<f64>>,
    d: usize,
) -> T
Expand description

Extract the provided density if it is Some(_), or compute the minimum required density 1/sqrt(d) as recommended by Li et al 1.


  1. Li, P., Hastie, T. J., and Church, K. W. (2006). Very sparse random projections. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining (KDD ’06). Association for Computing Machinery, New York, NY, USA, 287–296. Available from: doi:10.1145/1150402.1150436