Commit Graph

352 Commits

Author SHA1 Message Date
Pedro Martinez Mediano 8f169171e1 Fixed small bug in KSG mixed calc surrogates.
Surrogate calculator was applying timeDiff twice, so surrogate
dataset had abs(timeDiff) less observations than it should.
2017-11-20 14:14:49 +00:00
Pedro Martinez Mediano d40024e1cd Allow negative timeDiff in KSG mixed calc. 2017-11-20 14:02:00 +00:00
Pedro Martinez Mediano 83e77e8b3a Merge Joe's master into Pedro's master with KSG mixed changes. 2017-08-30 17:36:32 +01:00
Pedro Martinez Mediano 9b7d7c70c8 Add unittests for noise level and Theiler window in KSG mixed calc. 2017-08-30 13:31:13 +01:00
Pedro Martinez Mediano f56ac6e69e Fix bug with Theiler window in KSG mixed calc. 2017-08-30 13:30:30 +01:00
Pedro Martinez Mediano 5961fb6246 Add Theiler window and jitter to KSG mixed calc. 2017-08-30 12:17:02 +01:00
Pedro Martinez Mediano 9aea9c4a02 Added some tests for KSG mixed setProperty. 2017-08-30 09:14:56 +01:00
jlizier d36c803e41 Added utilities to convert between estimate values and p-values for an analytic null distribution in bulk (array calls) 2017-08-30 16:24:17 +10:00
Pedro Martinez Mediano 626293b84d More docs for KSG mixed calc. 2017-08-30 01:19:54 +01:00
Pedro Martinez Mediano e11218631e Added myself as author of KSG mixed calculator. 2017-08-29 23:56:28 +01:00
Pedro Martinez Mediano 49afa343fc Removed old variables and functions from KSG mixed, added docs. 2017-08-29 23:55:10 +01:00
jlizier 19f2c5abbc Performance tweaks for TE Discrete, which should make a difference when the state space is large in comparison to the number of samples. 2017-08-28 00:36:24 +10:00
jlizier c59d932a44 Misc spacing/comment patches 2017-08-23 00:19:43 +10:00
jlizier b2e3ae1ca0 Added missing getProperty() method to Conditional TE calculator Kraskov 2017-08-23 00:19:09 +10:00
jlizier 0e40ec2401 Initialising conditional TE calculator to have one conditional dimension by default instead of none. Also fixing the way the conditional parameters are printed via getProperty() when they are null. 2017-08-23 00:18:41 +10:00
jlizier 4db008ce33 For Conditional MI calculators (sontinuous), adding setObservations and addObservations method signatures which take univariate arrays (only work if initialised dimensionalities are univariate) into the interface, and the common base class. This is in preparation for the CMI AutoAnalyser 2017-08-22 21:26:44 +10:00
jlizier 4d6fc1a572 Updated Kozachenko-Leonenko multivariate Entropy calculator to implement EntropyCalculator interface, in preparation for Entropy AutoAnalyser 2017-08-21 14:56:20 +10:00
jlizier 086bee5945 Making continuous MultiInfoCalculator classes implement the InfoMeasureCalculatorContinuous interface. For the interfaces, this means removing methods where duplicated. For implementing classes, this means adding the missing methods. 2017-08-18 23:42:43 +10:00
jlizier 057f17e338 Making continuous PredictiveInfoCalculator classes implement the InfoMeasureCalculatorContinuous interface. For the interfaces, this means removing methods where duplicated. And fixed the common implementing class to have the missing getProperty method. 2017-08-18 23:11:37 +10:00
jlizier 65c7cd99cc Making continuous EntropyCalculator and EntropyCalculatorMultiVariate classes implement the InfoMeasureCalculatorContinuous interface. For the interfaces, this means removing methods where duplicated. Also added NUM_DIMENSIONS property to EntropyCalculatorMultiVariate interface, so that these calculators can have an initialise() method which takes no parameters. Fixed all implementing classes to have any methods that they were missing. 2017-08-18 20:18:29 +10:00
jlizier d6bd16546b Added new interface InfoMeasureCalculatorContinuous to capture common methods for continuous calculators. Also adapted most continuous calculators to implement this, which involved in many cases removing duplicate definitions of these methods in the interfaces for these measures. For ConditionalMI calculator, this meant we needed to add an implementation of the zero-argument initialise() call also. Still need to do MultiInfo, PredictiveInfo and Entropy in future, as they're missing a few methods. 2017-08-18 16:54:55 +10:00
jlizier 04351498aa Changed my mind and pulled EmpiricalNullDistributionComputer in as being extended/implemented by ChannelCalculatorDiscrete. (This does make sense, since "extend" for an interface really means implements, it's not so much a child class). This necessitated removing the interface from explicitly being named in the definitions of the discrete MI and TE calculators since it's there implicitly. 2017-08-18 15:40:00 +10:00
jlizier 3e64fd28bd Altering various continuous calculators to implement the EmpiricalNullDistributionComputer interface (where they're already implementing computeSignificance() etc.). Also altered the EmpiricalNullDistributionComputer methods to throw Exceptions, since the continuous calculators generally do this (and doesn't harm the discrete ones). Also involved implementing the methods in ConditionalMIMultiVariateCommon by selecting to permute the first variable by default. 2017-08-18 15:31:27 +10:00
jlizier 60105e6d10 ActiveInformationCalculatorDiscrete was stuck in the past and returning results computing with the log using the base of the alphabet size (everything else uses bits). I'm not sure how I missed this one. Fixed now. 2017-08-18 14:07:26 +10:00
jlizier d9e43d966a Added implementation of EmpiricalNullDistributionComputer to various discrete calculators which implement computeSignificance() etc. Also involved removing the method from ChannelCalculatorDiscrete, as there's no way of having it (an interface) specify implementing an interface without extending it which I didn't think was completely logical. So ChannelCalculators can always be checked against implementing EmpiricalNullDistributionComputer if one wants to use computeSignificance with them. This also required adding the computeSignificance(int[][]) method to ConditionalTECalculatorDiscrete and TECalculatorDiscrete 2017-08-18 13:58:38 +10:00
jlizier d77a9f274e Added interface ChannelCalculator for MutualInfoCalculatorMultiVariate; this should have always been there but not all calculators implemented the univariate methods. It previously only implemented ChannelCalculatorMultiVariate. Added those methods into MutualInfoMultiVariateCommon, which provides the base implementation for all required calculators, so all are now taken care of. This means MI and TE can both be fully used in one interface with the set/addObservations methods. 2017-08-18 13:54:10 +10:00
jlizier 70740c9753 Added new interface EmpiricalNullDistributionComputer. Will separately alter discrete and continuous calculators to implement this class where they are implementing the required measures. 2017-08-18 13:49:09 +10:00
jlizier fa6307b4f2 Fixing javadoc reference in AnalyticNullDistributionComputer to correct class 2017-08-18 13:48:03 +10:00
Pedro Martinez Mediano bfe8156584 Add KDTrees to computeLocalUsingObservations in KSG mixed calc. 2017-08-16 19:28:24 +01:00
Pedro Martinez Mediano 641d17ec24 Fix bug with normalisation in KSG mixed and change unittest accordingly. 2017-08-16 19:18:51 +01:00
Pedro Martinez Mediano faa98a8d79 Added more references and tests for KSG mixed calc. 2017-08-16 18:21:24 +01:00
Pedro Martinez Mediano 7635cf8689 Added computeLocalOfPreviousObservations to KSG mixed.
It follows the same pattern as the continuous MI: there is a
computeFromObservations method that returns either locals or average
based on a flag.
2017-08-16 14:52:54 +01:00
Pedro Martinez Mediano 1065662739 Added more tests to KSG mixed locals. 2017-08-16 14:51:33 +01:00
Pedro Martinez Mediano 2d42e6ebad Removed unused function from KSG mixed. 2017-08-16 14:39:53 +01:00
Pedro Martinez Mediano 23bb573bb1 Replace computeSignificance method in KSG mixed with new one based on clone(). 2017-08-16 14:33:47 +01:00
Pedro Martinez Mediano 8251bdc1cb Removed unused variables from KSG mixed. 2017-08-16 13:35:03 +01:00
Pedro Martinez Mediano f55a7bd961 Add KdTrees to main compute() method in KSG mixed. 2017-08-16 13:31:18 +01:00
Pedro Martinez Mediano bad50ce663 KSG mixed now ignores batches of data shorter than timeDiff. 2017-08-16 13:27:05 +01:00
Pedro Martinez Mediano b5d2b7e367 KSG mixed now throws error if discrete data is out of range. 2017-08-16 13:25:44 +01:00
Pedro Martinez Mediano 8d1d1ab0eb Moarr tests for KSG mixed. 2017-08-16 10:24:00 +01:00
Pedro Martinez Mediano 9b42911c60 Add KSG mixed unit test comparing against analytical value. 2017-08-16 01:01:31 +01:00
Pedro Martinez Mediano dcd6314082 Add a few unit tests for KSG mixed calculator. 2017-08-16 00:26:53 +01:00
Pedro Martinez Mediano 437e606233 getNumObservations in KSG mixed now returns totalObservations.
Before it returned continuousData.length, which more more prone
to null pointer errors, and therefore riskier.
2017-08-16 00:07:51 +01:00
Pedro Martinez Mediano 39ad14d855 Added function to set timeDiff property. 2017-08-15 21:41:52 +01:00
Pedro Martinez Mediano abeb15cd6e Added standard start/finaliseAddObservations to mixed KSG calc. 2017-08-15 21:25:03 +01:00
Pedro Martinez Mediano 26137d12b1 Added precomputed digammas in KSG mixed calculator, fixed bug in locals. 2017-08-15 20:46:07 +01:00
jlizier 550bbae5c1 Patched computeSignificance() for discrete TE calculator, since this was not returning the correct degrees of freedom for the Chi square distribution (it multiplied the history lengths by the base, instead of raising them to the power) 2017-06-16 13:39:43 +10:00
jlizier bd94172d60 Removed setting the miComputed flag to true in a computeLocal method, since this could be called with new observations. 2017-06-16 13:38:45 +10:00
jlizier e25364b84c Added computeSignificance() to AIS discrete calculator 2017-06-16 13:38:11 +10:00
jlizier ea40f48bbc Adding new methods computePValueForGivenEstimate() and computeEstimateForGivenPValue to AnalyticMeasurementDistribution and implementing in ChiSquareMeasurementDistribution. Involves importing (and refactoring) a significantly larger chunk of commons.maths3 classes (and updating existing ones to latest 3.6.1 version for consistency). Also addresses issue #23 in changing the actual value of the ChiSquareMeasurementDistribution to be that of the information theoretic measurement rather than 2*N times it (which was the value that is actually chi squared distributed), which also necessitates changes to the Discrete and Gaussian calculators computeSignificance() methods. 2017-06-14 11:09:01 +10:00