Does the localTranEntropy file refers to the time series and per particle values of local transfer entropy

40 views
Skip to first unread message

Mohammad Samsuzzaman

unread,
Mar 30, 2022, 6:41:56 PM3/30/22
to Java Information Dynamics Toolkit (JIDT) discussion

Dear Professor Dr. Joseph Lizier, 

      My name is Mohammad Samsuzzaman, and I am a PhD student in the department of physics , Savitribai Phule Pune University, India. I recently came across your JIDT toolkit(also the publications resulting from it) and found it to be very very interesting and useful, especially i was working on the demo example of flocking as given in the JIDT demos, However i have a few doubts regarding the transfer-entropy calculations which i did not find any answer in your github page or in the publications, and i would be immensely thankful to you if you could provide me with some clue, 

Initial Setup :I have used NetLogo to simulate the demo file Flocking.nlogo with a population size of 1000 and for 20 time steps only which gives 3 output files positionsx.txt, positionsy.txt and headings.txt, Now in matlab i executed loadProperties.m and then runAnalysis.m which successfully gave me a results.mat file. 

The results.mat has various files in it such as localTranEntropy, fileTimeAndPair,tranEntropy etc. Now my aim here is to calculate the local transfer entropy of swarm individual ( like in Wang et al. https://doi.org/10.1371/journal.pone.0040084 ) and in https://www.youtube.com/shorts/4-PA6hYhjHw?&ab_channel=JosephLizier .

 

Questions:

1.  So does the localTranEntropy file refers to the time series and per particle values of local transfer entropy.(This is vital for me to color the swarm individual based on their local transfer entropy values , for animation purpose) 

2.  If so, then why do I get only 17 time steps values out of 20 time steps in the file localTranEntropy i gave initially . Do the initial 3 files are used to create some sort of “memory” for calculations of TE. Also, does this 17 files refer to the last 17 files out of the 20 time steps.  

 I look forward to hearing back from you.

 

Thanking You 

Yours Sincerely

Mohammad Samsuzzaman

Joseph Lizier

unread,
Mar 30, 2022, 9:36:03 PM3/30/22
to JIDT Discussion list
Hi Mohammad,

1. localTranEntropy is a variable in the results file, not a file itself. I've added just now a utility I had called watchLocalTEs which uses it to color the swarm in an animation -- check that out in the repository.
Basically localTranEntropy has one row for each source-target sample in our data where the source and target were within range.
You can see which sample each value in localTranEntropy is for by referring back to the fileTimeAndPair array. Here, again we have one row for each source-target sample in our data where the source and target were within range. Each row specifies the index of which raw data file this was from, which time index, which target index and which source index. You can use that to then pull up the relevant rows for a given target at a different time, and average over the TEs from all of the sources in range.

2. First, the raw locations of each individual get translated into heading updates for the analysis, so you have one less heading update that the number of time steps in the initial files.
Next, because TE conditions on previous steps in the analysis (here previous heading updates), you always have less local TE values than the number of time samples in your analysis. The longer the history you are conditioning on (k), the more steps at the start you won't have a local TE for. (It can't return a local TE for the first k steps).
Those two reasons are why there are less time steps with local TE than the number of time steps you observe the flock for. The time steps referred to in the fileTimeAndPair are the time step of the next value of the target in the target update that is receiving the information.

--joe



--
JIDT homepage: https://github.com/jlizier/jidt
---
You received this message because you are subscribed to the Google Groups "Java Information Dynamics Toolkit (JIDT) discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jidt-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jidt-discuss/d6ffb8f8-bf12-4157-9f72-39bcea0dc08fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages