Hello Jim,
You're welcome, and sorry for the late answer. Yes, the code
KraskovI1[list, list+T, 4], with T ranged 0,20
is equivalent to ResourceFunction["MutualInformation"][list,20]
. Also note that there's the alternative ResourceFunction["MutualInformation"][list,t,s]
. Moreover, note that the 4
in your example is now an option, "KNeighbour", which is used when working with lists of samples.
When working on the project I needed some more flexibility and opted to work directly with the function KraskovI1
. Later I wrapped it up in the function MutualInformation
and submitted it to the repository, so that's the reason on the discrepancies you see.
As a side note, I'm slowly updating the function to make it better, I updated it to work on any multivariate distribution and added some more error checking. You can always find an updated version here, but hopefully it will be soon on the Wolfram Function Repository.
About your last question, I'm not sure what you mean. As you noticed, the first element is the zero-shift MI, which is not 0, but some of my plots are "clipped" to show the most interesing part, since a peak at position 1 isn't that interesting and was usually too high.
Also, ListLinePlot
will always plot any list starting from 1, if you need the plot to start from 0 you have to specify an x value along with the y value, e.g.
ListLinePlot[Thread[List[Range[0, 9], Range[10]]], PlotRange -> All]
If you need any further help, please feel free to contact me on linkedin (you can find it on my profile).
And good luck with your work!