Returns a function that attempts to align a series of data by its id. See also align for a version with no internal storage.
// Compare data based on x,y distanceconst fn = (a, b) => { return 1-Points.distance(a, b);}const aligner = Correlate.alignById(fn, opts);const lastData = [ { id:`1`, x:100, y:200 } ...]const aligned = aligner(lastData); Copy
// Compare data based on x,y distanceconst fn = (a, b) => { return 1-Points.distance(a, b);}const aligner = Correlate.alignById(fn, opts);const lastData = [ { id:`1`, x:100, y:200 } ...]const aligned = aligner(lastData);
Function to compute similarity
Options
Returns a function that attempts to align a series of data by its id. See also align for a version with no internal storage.