diff --git a/demos/octave/example3TeContinuousDataKernel.m b/demos/octave/example3TeContinuousDataKernel.m index c1855f6..594cf39 100755 --- a/demos/octave/example3TeContinuousDataKernel.m +++ b/demos/octave/example3TeContinuousDataKernel.m @@ -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()); + diff --git a/demos/octave/example4TeContinuousDataKraskov.m b/demos/octave/example4TeContinuousDataKraskov.m index c8af0c9..7d353c9 100755 --- a/demos/octave/example4TeContinuousDataKraskov.m +++ b/demos/octave/example4TeContinuousDataKraskov.m @@ -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));