Skip to contents

A Gower-style weighted mean absolute difference over the axes both signatures define. Axes that are NA in either signature are dropped and the weights renormalized, so a column with no numeric content is not penalized for lacking a numeric axis.

Usage

fx_signature_distance(a, b, weights = SIGNATURE_WEIGHTS, per_axis = FALSE)

Arguments

a, b

Signatures from fx_type_signature().

weights

Per-axis weights (default SIGNATURE_WEIGHTS; see also WEIGHTS_FORMAT).

per_axis

If TRUE, return the per-axis absolute differences instead of the aggregated distance.

Value

A single distance in [0,1], or a named per-axis vector.