In [ ]:
%matplotlib inline
In [ ]:
# Code source: Andrew Heusser
# License: MIT
# import
import hypertools as hyp
import numpy as np
import scipy
# load example data
geo = hyp.load('spiral')
geo.plot(title='Before Alignment')
# use procrusted to align the data
source, target = geo.get_data()
aligned = [hyp.tools.procrustes(source, target), target]
# after alignment
hyp.plot(aligned, ['-','--'], title='After alignment')