Closed Projector3567 closed 9 months ago
Please share the following for us to identify the root cause:
This is our dataset:
ALMA screenshot:
Config.yaml:
Hi! The set-up above looks alright. I wasn't able to replicate the error with the same data format and configurations on an existing installation.
I would recommend switching to Python 3.8 and see if the error disappears, as that's the version proven to work. If the error persists, it could be due to dependencies (and not necessarily fastdtw
or scipy
). Please share a copy of your dependency versions in that case for replication.
N272_treadmill_30_baselineDLC_resnet50_2023 RtSt KinematicsAug29shuffle1_650000.csv I switched to Python 3.8 and managed to get it running. However, I don't receive any output. I am attaching the file I used to try to extract the parameters from. Thanks a lot.
Hi, to debug issues regarding data analysis, we need more information (configurations and recording parameters). Please get in touch directly :)
I'll close this thread, as the initial problem was solved by using a compatible Python version.
While attempting to extract kinematic parameters using the extract_parameters function from KinematicsFunctions, I encountered a ValueError that says "Input vector should be 1-D". I'm using Python 3.11.
Traceback (most recent call last): File "...AnalyzeStride.py", line 697, in ExtractParameters parameters, pd_dataframe_coords, is_stance, bodyparts = KinematicsFunctions.extract_parameters(...) File "...KinematicsFunctions.py", line 733, in extract_parameters pairwise_dtw_res_x_5 = pairwise_dtw(toe_xs) File "...KinematicsFunctions.py", line 194, in pairwisedtw distance, = fastdtw.fastdtw(iterable[i], iterable[j], dist=euclidean) File "...site-packages\fastdtw\fastdtw.py", line 53, in fastdtw return fastdtw(x, y, radius, dist) [Several recursive calls in fastdtw.py] File "...site-packages\fastdtw\fastdtw.py", line 130, in dtw return dtw(x, y, None, dist) File "...site-packages\fastdtw\fastdtw.py", line 141, in __dtw dt = dist(x[i-1], y[j-1]) File "...site-packages\scipy\spatial\distance.py", line 536, in euclidean return minkowski(u, v, p=2, w=w) File "...site-packages\scipy\spatial\distance.py", line 479, in minkowski u = _validate_vector(u) File "...site-packages\scipy\spatial\distance.py", line 318, in _validate_vector raise ValueError("Input vector should be 1-D.") ValueError: Input vector should be 1-D.
The error originates from the euclidean distance function in scipy.spatial.distance. The euclidean function expects 1-D vectors as input. However, it seems that one or both of the vectors being passed to it are not 1-D. This might be due to the data being processed or perhaps the way the fastdtw function is handling the data.
Any guidance on how to resolve this issue would be greatly appreciated.