Commit Graph

307 Commits

Author SHA1 Message Date
Joseph Lizier 3d1f3fec86 Gathering common functionality of EntropyMultiVariate estimators into a Common class. Adds some new functionality (e.g. addObservations() for Gaussian and Kernel) 2024-04-20 17:57:38 +10:00
Joseph Lizier 2a18cd0e74 Adding property to allow used to set random seed for noise addition to data in MI, CMI and wrapped estimators. Closes issue #99 2024-04-16 14:08:04 +10:00
Joseph Lizier 2130985c34 Adding/implementing interfaces for continuous CMI estimators to allow all combinations of univariate/multivariate arrays to be passed for var1/var2/conditional 2023-10-27 10:04:25 +11:00
Joseph Lizier 4b85a7fd46 AIS and TE estimators (for KSG in particular) utilising the underlying NN Searchers holding the different data sets separately. 2023-10-09 13:16:27 +11:00
Joseph Lizier ec8e7f848f CMI common estimators utilising underlying nearest neighbour searchers holding different data sets separately (for dynamic correlation exclusion) 2023-10-09 13:15:56 +11:00
Joseph Lizier 5f87e2018b MI common estimators utilising underlying nearest neighbour searchers holding different data sets separately (for dynamic correlation exclusion) 2023-10-09 13:14:29 +11:00
Joseph Lizier a554361de9 Adding unit test for no conditional on CMI Gaussian 2023-10-06 12:29:37 +11:00
jlizier 2714650cfa Amending Kraskov (KSG) MI estimators to have an experimental method to provide conditional entropy of the first variable given the second. Works by removing the Kozachenko Leonenko entropy of variable 1 from the MI, using the same kNN radii as the MI estimator. Includes Unit tests to provide some initial validation. 2022-06-16 21:29:29 +10:00
Joseph Lizier 0e33393cdc
Merge pull request #86 from pmediano/master
Thanks Pedro, and sorry to take so long to attend to this
2021-11-15 12:08:57 +11:00
Joseph Lizier b02760ddd3 Adding overloads on setObservations and addObservations for MI and TE calculators to handle one variable univariate and one variable multivariate 2021-11-15 10:58:59 +11:00
Joseph Lizier 21ae0bdeaa Fixing logic error in printing whether GPU calculation was falling back to CPU 2021-10-08 11:28:37 +11:00
Joseph Lizier 650159661d Patching conditional MI calculator to properly allow null or empty conditionals if dimension of conditionals is 0 2021-09-06 10:23:31 +10:00
Joseph Lizier aa8148eca9 Updates to KL entropy estimator: removing NORMALISE property, and adding method for cross entropy 2021-08-23 09:09:49 +10:00
Pedro Mediano 07883af734 Updated printed messages with cross-platform newline character. 2021-02-09 10:23:30 +00:00
Pedro Mediano bc8c233e68 Added KSG implementation of various multivariate IT measures and unit tests. 2021-01-25 12:41:01 +00:00
Pedro Mediano f67e274819 Added Gaussian implementation of various multivariate IT measures and unit tests. 2021-01-24 22:06:39 +00:00
Pedro Mediano 403745800e Added abstract parent class for multivariate IT measures on continuous data. 2021-01-24 21:56:26 +00:00
Joseph Lizier 3222b5a629 Implementation and unit test for KSG MI calculation with new samples (both algorithms 1 and 2) 2020-10-30 16:21:10 +11:00
Joseph Lizier 0606f8ab39 Cleaning up CMI Kraskov for new samples, including fixing some comments, logic of not using GPU for this, and if no conditional counting all point as a conditional match 2020-10-30 16:19:31 +11:00
Joseph Lizier 34161a2e6d Adding non-overloaded method signatures for multivariate arrays, so that the jpype python-java bridge can resolve which method signature to use more directly via these 2020-05-22 14:42:26 +10:00
Joseph Lizier bf207f866e Patched error in computing start and end times for valid observation sequences in conditional TE calculators (with validity booleans) 2020-05-21 00:57:34 +10:00
Joseph Lizier d0a0fca40c Added non-overloaded method calls for conditionalTE continuous' addObservations() method calls with validity booleans - this is for JPype from Python which seems unable to resolve overloads of double[] and double[][], when more than one variable changes in this way 2020-05-16 12:18:57 +10:00
Joseph Lizier cbcca8d0ff fixing addedMoreThanOneObservationSet for the MultiInfoCalculator 2020-05-15 17:35:54 +10:00
Joseph Lizier 510f999d2e Adds addObservations calls with validity arrays for conditional transfer entropy 2020-05-15 17:34:00 +10:00
Joseph Lizier 2ab3ac01bb Adding non-overloaded method signatures for adding 1D vs 2D observations for common class for continuous MI and CMI estimators, since JPype 0.7 does not seem able to resolve overloaded 1D vs 2D arrays any longer 2019-07-25 23:11:44 +10:00
Joseph Lizier 1db8a2ac63 Making local computation for CMI Gaussian calculator store the lastAverage if it was called with the previous observations 2019-05-17 22:47:16 +10:00
Joseph Lizier fce1b34a5c Adding NORMALISE and NOISE_LEVEL_TO_ADD properties to all conditional mutual information calculators for continuous-valued data (extends this capability from only KSG to Gaussian as well) 2019-04-03 00:12:00 +11:00
Joseph Lizier d9db7a15ab Further clarifications for including NORMALISE and NOISE_LEVEL_TO_ADD properties to all mutual information calculators, and handling linear redundancy sub-cases 2019-04-03 00:07:05 +11:00
Joseph Lizier b1437452e4 Adding NORMALISE and NOISE_LEVEL_TO_ADD properties to all mutual information calculators for continuous-valued data (extends this capability from only KSG to Gaussian and kernel as well, the latter already had NORMALISE) 2019-04-02 12:38:17 +11:00
Joseph Lizier 2a0024ad83 Fixes issue #17: Handling sub-cases for linear redundancy within and across variables in the linear-Gaussian mutual information estimator. This is done by detecting such redundancies and either returning 0 or infinity as the requisite result. Mirrors how this is done for conditional MI. 2019-03-29 00:01:36 +11:00
Joseph Lizier 66676a2692 A rewrite of parts of the linear Gaussian conditional MI estimator, in order to more deftly handle linear dependencies within variables 1 and 2, and between each of them and the conditional. Previously we removed sub-variables of those arbitrarily, now the removal is targetted to those sub-variables that are problematic. Also required some variable name changes to reflect different ordering of how variables and the conditionals are concatenated in arrays. 2019-03-28 23:58:53 +11:00
Pedro Martinez Mediano c616ba55d4 Added link to wiki in GPU loader error message. 2018-11-25 19:25:33 +02:00
jlizier 8909c23fcc Incorporated auto-embedding in the TE multivariate via conditional MI common class. Much of the code is moved up from the TE multivariate KSG estimator; now the functionality is provided for multivariate Gaussian as well. Also necessitated adding the max_cor_num_surrogates property to TE multivariate Gaussian, and took the opportunity to make much of the whitespace here consistent, and unit tests added for Gaussian (tweaked slightly for KSG) 2018-10-18 00:58:17 +11:00
jlizier 42f8d01e26 Adding property of number of dimensions for the AIS multivariate calculator (and implemented in the via MI common class). Needed this to make multivariate TE embedding a bit neater, and it should be there anyway. 2018-10-18 00:51:37 +11:00
jlizier e1bad39e4e Added proper full definitions for the methods of the AIS multivariate interface; much of this is achieved by extending the univariate AIS interface (which mandates that the univariate methods must be supported). No current child classes required any changes as they all supported these already. Removed superfluous documentation in the AIS multivariate via MI class (as well as fixing whitespace inconsistencies therein) 2018-10-17 23:37:43 +11:00
jlizier da418c31a0 Added new auto-embedding capability for TE Gaussian into the AutoAnalyser GUI demo. Also added new auto-embedding drop down option of Max corrected AIS + TE for KSG as well, and debugged the getProperty returning of the number of nearest neighbours for Ragwitz criteria now that this occurs in the common superclass instead of in KSG (and gave this a reasonable default of 4) 2018-10-17 14:23:20 +11:00
jlizier a34bce25ba Enabled auto-embedding for TE Gaussian. Did so by bringing up auto-embedding for TE functionality up from the KSG estimator to the via Conditional MI class. Also added new property to Gaussian TE for number of surrogates to use for bias correction in embedding (if not using analytic bias correction), like Gaussian AIS. This also necessitated adding an empty preFinaliseAddObservations() method to the TE Gaussian multivariate estimator, to ensure it did not yet try to autoembed until that is enabled in the multivariate calculator. Unit tests included here as well (included using more samples for TE KSG autoembedding to ensure we get the correct answer more reliably -- should probably add a stronger effect for that too). 2018-10-17 13:49:09 +11:00
jlizier efb8243ed7 Altering TE Kraskov to do auto-embedding properly when we have added multiple observations with validity vectors. Also taking the opportunity to re-engineer the internals to lay groundwork for auto-embedding function to be shared with the Gaussian estimator at a later stage. Unit tests added here as well for the above. 2018-10-15 20:56:50 +11:00
jlizier 2ff6d8aeec Added getProperty for AIS Kraskov multivariate. Need to re-engineer this class for proper code re-use anyway. 2018-10-15 14:38:46 +11:00
jlizier 3aa1493d7f Added addObservations() method with sourceValid and destValid boolean arrays to TransferEntropyCalculatorViacondMutualInfo class 2018-09-21 10:34:01 +10:00
jlizier 9dbe2f8578 Added to AutoAnalyser GUI for AIS surrogate-based bias correction (parameter being the number of surrogates) for max AIS corrected auto embedding, for kernel estimator as well as Gaussian (as an alternative to analytic). Also includes the implementing code for AIS Gaussian (was already committed for kernel) 2018-08-27 14:24:05 +10:00
jlizier ad31af03a7 Added throws Exception for computeSignificance() on multivariate Gaussian AIS calculator, because of throws clause introduced on underlying MI estimator 2018-08-27 13:21:29 +10:00
jlizier 7f9b1c0812 Patching bias correction for Guassian MI and CMI (some for MI was in line with previous work for CMI, which required extending here). Unit tests included. 2018-08-27 13:17:58 +10:00
jlizier c32b8de8b0 Fixed a hanging issue with analytic bias correction for Guassian CMI, and added to AutoAnalyser GUI 2018-08-27 00:22:02 +10:00
jlizier 908cf675a8 Added new constructor for TE Kraskov to pass in KSG algorithm number as an integer (It's not likely that it will be needed, but is there for completeness to match the AIS one) 2018-08-24 14:48:11 +10:00
jlizier 373ebbdd56 Enabling AIS KSG calculator to have underlying KSG algorithm changed via the "ALG_NUM" property 2018-08-24 14:47:21 +10:00
jlizier ca909dc60f Adding check of dimensionality of observations supplied to multivariate AIS calculators when univariate is expected. 2018-06-19 23:45:00 +10:00
jlizier 643212840a Making indenting style consistent through file 2018-05-18 08:56:47 +10:00
jlizier dfe7ef0334 Altering AIS Multivariate Via Mutual Info calculator -- and child classes, now including kernel estimator -- to support auto-embedding primarily via the parent methods of the univariate AIS calculator.
Also includes patching functionality when dimension == 1 to always use the underlying AIS univariate calculator consistently, and adding missing methods on adding observations with validity array.
Also includes some minor alterations to error messages.
Gaussian and Kernel Multivariate AIS calculators have the computeAdditionalBiasToRemove()  method implemented now to allow this; Gaussian calculator also adds the analytic computeSignificance() method, whilst Kernel calculator also adds a property for the number of surrogates to use in bias correction.
2018-05-16 22:42:32 +10:00
jlizier fcd30c6716 Minor changes to Javadocs for AIS kernel 2018-05-16 22:28:19 +10:00