_images/logo.png

UMAP EFDA Metrics#

Distance metrics for functions and curves in R^n for use with UMAP (lmcinnes/umap)

moduleauthor:: J. Derek Tucker <jdtuck@sandia.gov>

umap_metric.efda_distance(q1, q2, alpha=0)[source]#

” calculates the distances between two curves, where q2 is aligned to q1. In other words calculates the elastic distances/ This metric is set up for use with UMAP or t-sne from scikit-learn

Parameters:
  • q1 – vector of size N

  • q2 – vector of size N

  • alpha – weight between phase and amplitude (default = 0, returns amplitude)

Return type:

scalar

Return dist:

amplitude distance

umap_metric.efda_distance_curve(beta1, beta2, closed)[source]#

” calculates the distances between two curves, where beta2 is aligned to beta1. In other words calculates the elastic distance. This metric is set up for use with UMAP or t-sne from scikit-learn

Parameters:
  • beta1 – vector of size n*M

  • beta2 – vector of size n*M

  • closed

    1. if open curves and (1) if closed curves

Return type:

scalar

Return dist:

shape distance