mirror of https://github.com/jlizier/jidt
Adding bias calculation and local TE calculations to Matlab/Octave examples 3 and 4 respectively
This commit is contained in:
parent
643d76fe19
commit
ef57fd2675
|
|
@ -45,3 +45,9 @@ result2 = teCalc.computeAverageLocalOfObservations();
|
|||
fprintf('TE result %.4f bits; expected to be close to 0 bits for uncorrelated Gaussians but will be biased upwards\n', ...
|
||||
result2);
|
||||
|
||||
% We can get insight into the bias by examining the null distribution:
|
||||
nullDist = teCalc.computeSignificance(100);
|
||||
fprintf(['Null distribution for unrelated source and destination ', ...
|
||||
'(i.e. the bias) has mean %.4f and standard deviation %.4f\n'], ...
|
||||
nullDist.getMeanOfDistribution(), nullDist.getStdOfDistribution());
|
||||
|
||||
|
|
|
|||
|
|
@ -48,4 +48,9 @@ teCalc.setObservations(sourceArray2, destArray);
|
|||
result2 = teCalc.computeAverageLocalOfObservations();
|
||||
fprintf('TE result %.4f nats; expected to be close to 0 nats for these uncorrelated Gaussians\n', result2);
|
||||
|
||||
% We can also compute the local TE values for the time-series samples here:
|
||||
% (See more about utility of local TE in the CA demos)
|
||||
localTE = teCalc.computeLocalOfPreviousObservations();
|
||||
fprintf('Notice that the mean of locals, %.4f nats, equals the previous result\n', ...
|
||||
sum(javaMatrixToOctave(localTE))/(numObservations-1));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue