Closed dishangti closed 6 months ago
Here are the parameters for remodnav, we used a 10.5-inch screen (16:9 with a resolution of 2560x1600), and the viewing distance is approximately 50 cm.
filtered_move = pd.read_csv('test.csv')
eye_clf = remodnav.clf.EyegazeClassifier(remodnav.clf.deg_per_pixel(0.2262,0.5,2560), 60, min_saccade_duration=0.1667)
eye_clf.preproc(filtered_move, savgol_length=0.05)
Hey, thanks for the detailed issue and the data! I tried reproducing the error you are seeing, but things seem to work for me. Here is what I did:
test.csv
into the right format as specified in the README (tab separated file with two columns (x and y, no header), one row per time point):In [4]: filtered_move = pd.read_csv('test(1).csv')
In [5]: filtered_move
Out[5]:
Unnamed: 0 x y t
0 0 NaN NaN 20912
1 1 NaN NaN 20929
2 2 NaN NaN 20945
3 3 NaN NaN 20962
4 4 NaN NaN 20979
.. ... ... ... ...
567 567 631.547639 873.589568 30362
568 568 637.170350 853.189800 30379
569 569 640.885495 839.832655 30395
570 570 644.620697 827.325742 30412
571 571 648.052845 817.226048 30429
[572 rows x 4 columns]
In [6]: filtered_move[['x', 'y']]
Out[6]:
x y
0 NaN NaN
1 NaN NaN
2 NaN NaN
3 NaN NaN
4 NaN NaN
.. ... ...
567 631.547639 873.589568
568 637.170350 853.189800
569 640.885495 839.832655
570 644.620697 827.325742
571 648.052845 817.226048
[572 rows x 2 columns]
In [7]: filtered_move[['x', 'y']].to_csv('tabsep_test.tsv', sep='\t', index=False, header=False)
I computed the px2deg factor like you did
In [2]: remodnav.clf.deg_per_pixel(0.2262,0.5,2560)
Out[2]: 0.009957662958692767
I used your parameters and ran everything
❱ remodnav tabsep_test.tsv out.csv 0.009957662 60 --savgol-length=0.05 --min-saccade-duration=0.1667
/home/adina/env/remodnav/lib/python3.11/site-packages/numpy/core/fromnumeric.py:3464: RuntimeWarning: Mean of empty slice.
return _methods._mean(a, axis=axis, dtype=dtype,
/home/adina/env/remodnav/lib/python3.11/site-packages/numpy/core/_methods.py:192: RuntimeWarning: invalid value encountered in scalar divide
ret = ret.dtype.type(ret / rcount)
(remodnav) adina@muninn in ~/Downloads
❱ head out.csv
onset duration label start_x start_y end_x end_y amp peak_vel med_vel avg_vel
1.733 0.050 FIXA 862.75524 1374.90469 724.57951 1378.51875 0.626 44.998 41.291 41.291
2.433 0.117 FIXA 1088.03512 1345.97825 918.95416 1463.89000 1.348 48.359 31.438 30.602
2.667 0.317 FIXA 605.47506 1359.72207 371.88196 1578.27927 2.273 164.438 50.246 62.679
3.550 0.050 FIXA 986.49773 1625.86809 1079.21629 1626.67892 0.466 27.943 27.699 27.699
5.417 0.050 FIXA 305.54610 1515.10409 140.12559 1522.52111 1.116 66.967 49.489 49.489
5.817 0.050 FIXA 230.89659 1409.34927 246.69741 1395.34746 0.094 9.192 7.412 7.412
6.167 0.050 FIXA 514.76449 1566.14658 520.02841 1568.48810 0.004 3.360 1.788 1.788
6.217 0.217 PURS 517.90097 1569.62444 556.91378 1599.53003 0.489 8.864 2.816 3.473
7.667 0.050 FIXA 951.38354 1235.78330 864.18940 1195.03860 0.494 29.622 28.751 28.751
Could you share the software versions of numpy, scipy, and statsmodels you have installed?
Thank you very much for your detailed reply. However, it still didn't work although I followed all the steps. Here is the version of my packages: numpy==1.23.5, scipy==1.9.1, statsmodels==0.14.0. I'll create a new environment with your software versions and try again.
Fortunately, I get the same output after upgrading these three packages. But I get the same warning just as yours, does it matter?
Glad that it works!
The warning per se isn't necessarily a bad sign, its likely an internal attempt to divide by zero or nan (which should be handled in the code). But now that you have results, you should closely investigate whether they look plausible given your data and paradigm. You could, e.g., plot the results with the show_gaze
function (see https://github.com/psychoinformatics-de/remodnav/issues/28#issuecomment-913737832 for an example). Keep in mind that this algorithm was not validated for data with low sampling rates, and we as authors have no experience with such sampling rates ourselves. :) Good luck!
I'm closing this issue as resolved, but please feel free to reopen it or open a new one if you disagree. :)
Hello, I hope this message finds you well. I recently attempted to apply your methodology to our 60Hz dataset. Our dataset, which incorporates data from children, unfortunately contains a significant amount of NaN values.
During implementation, I encountered the following error: "LinAlgError: SVD did not converge in Linear Least Squares." Though I noticed that there are provisions for processing NaN values, I still wonder if these NaN values might be the root cause of the convergence issue.
To address this, I have ensured that the valid data points exceed a threshold of 5, but it didn't work. Additionally, I have attached the data file for your reference.
Any insights or suggestions you could provide to overcome this challenge would be greatly appreciated. Thank you for your attention to this matter.
test.csv