Skip to content

distance dispatch

polars_ts._distance_dispatch

Shared distance dispatch utilities for clustering and classification.

compute_distances(df1, df2, method='dtw', **kwargs)

Compute pairwise distances using the specified method.

pairwise_to_dict(df)

Convert pairwise result DataFrame to {(id1, id2): distance} dict.

The dict is symmetric: both (a, b) and (b, a) are stored.