multimatch_gaze icon indicating copy to clipboard operation
multimatch_gaze copied to clipboard

Docomparision issue KeyError : None dijkstra function

Open kmamine opened this issue 5 years ago • 4 comments

Hi while comparing 2 scanpaths i came across this issue here and I don't now what it means.

Error Log :
Traceback (most recent call last): File "calculate_metrics.py", line 53, in <module> res = m.docomparison(pred_vec, gt_vec) File "/home/amine/anaconda3/envs/jardozka/lib/python3.6/site-packages/multimatch/multimatch.py", line 905, in docomparison path, dist = dijkstra(weightedGraph, 0, szM[0] * szM[1] - 1) File "/home/amine/anaconda3/envs/jardozka/lib/python3.6/site-packages/multimatch/multimatch.py", line 579, in dijkstra path.append(pred[path[-1]]) KeyError: None

kmamine avatar Jun 16 '20 09:06 kmamine

hi, could you maybe share a bit more information such a the command that you used and ideally even the files (or dummy files) for me to try to recreate this?

adswa avatar Jun 16 '20 16:06 adswa

I Solved the issue, apparently that happens when there is a nan value in one of the vectors. is there a way to handle this, except ignoring the vector ? maybe you should add an Error to throw here which can describe the problem in a better way, maybe check the vectors before starting to compare.

kmamine avatar Jun 17 '20 08:06 kmamine

Completely agreed :) I can't get to it right away as I'm busy in a hackathon and conference afterwards, so feel free to do a PR (it seems you have a good understanding of the problem already)

adswa avatar Jun 17 '20 08:06 adswa

I'm reopening this as it is a useful thing to address. I'll leave it as a "good first issue" for Hacktoberfest, but if not addressed, I'll come back to it in November. :)

adswa avatar Sep 25 '20 07:09 adswa