Skip to main content

dispatch_log_map

Function dispatch_log_map 

Source
pub fn dispatch_log_map(
    values: ArrayView2<'_, f64>,
    label: &str,
    base: Option<ArrayView1<'_, f64>>,
    weights: Option<ArrayView1<'_, f64>>,
) -> Result<(Array2<f64>, Array1<f64>, String), String>
Expand description

String-driven response-geometry log map: parse the user label (with shape inference from the response column count), pick the base point (intrinsic Fréchet mean when base is None), map every row to its tangent, and report the canonical resolved label. This is the curved-manifold analogue of the sphere/simplex dispatch and the single entry the FFI calls for these geometries.

weights are the per-observation prior weights used ONLY to pick the intrinsic base point (they are ignored when an explicit base is supplied). When the caller supplies observation weights they must reach the linearization point so the tangent chart is expanded around the weighted Fréchet mean — where the weighted mass lives — matching the weighted tangent regression run there (#2125). None recovers the uniform intrinsic mean.