Closed araiari closed 6 months ago
If multidimensional you will treat them as open curves in R^N and turn off rotation. I do not want to modify the distance function as such as it is not correct. You could extended the elastic depth to use the calc_shape_dist
when multidimensional and open/closed curves are needed. When you have multidimensional the shape distance is correct, not L2.
Additionally, the function f_to_srvf
is correct as it is designed for functions in R^1 not R^n. The correct function is curve_to_q
. The name is historical, but if we need to emphasize multidimensional we can update the documentation.
Though I just realized we had a modification in f_to_srvf
where someone made it multidimensional which is not correct.
I have updated curve_to_q
to reflect multidimensional data and calc_shape_dist
. If you want to expand the depth concept to this distance let me know or I can do it. I need to update kmeans
for the change so master will be broken for a bit today
okay changes have been pushed to master, let me know if you want to make your changes to elastic.depth for the correct distance.
I updated all function to merge with the master, removing my previous changes.
I improved the documentation of functions designed for curves and multidimensional functions:
I also added the function curve_depth
that expands the depth concept to curves and is based on the function calc_shape_distance
.
Extension to the multidimensional case of the two functions
elastic.distance
andelastic.depth
The functions take as input either a matrix (as before) for unidimensional functions or an array for multidimensional functions. The subsequent code is modified accordingly to deal also with arrays.
Fix issues in the function
srvf_to_f
In the case of multidimensional functions as input, there was an issue in the object to be returned: instead of returning an array of sizes $L \times M \times N$, the function returned a matrix of dimensions $LM \times N$. The issue is now fixed.