Nearest Neighbor(NN) linking in TrackMate returns different result per each trial

Hi, I’m using TrackMate for single molecule analysis.
I noticed that NN search produce different spot linking results(e.g. number of tracks) even though the parameters are exactly the same.
Number of spots are always the same.
Why does this happen?
Is pseudo random numbers used in NN?

I’m not a native English speaker, I’m sorry for my poor English…
What I want to say
Spot detection(number of spots1) -> NN(tracking result1) -> reboot TrackMate ->
Spot detection(number of spots2) -> NN(tracking result2)
number of spots1 == number of spots2
result1 != result2


I rechecked the code and my shallow reading did not find an obvious reason why.

The NN linker results CAN in theory vary. Indeed this linker is very local and greedy. If it links s0 and s1, then s1 becomes unavailable to link to others, even is s1 might make a better (lower cost) link with another spot.

But this should happen only if the iteration order for source spots (s0 spots) is different everytime. It seems like it is not so I do not know yet :frowning:

1 Like

Thank you for your reply!
Since the particle density of the data was high, there might be many linking candidates.

For now, I’ll learn about other algorithm and try to get better quality data :slightly_smiling_face:.