Commit Graph

136 Commits

Author SHA1 Message Date
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
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 a58a01fbfd Added discrete implementation of various multivariate IT measures and unit tests. 2021-01-24 22:13:15 +00:00
Pedro Mediano f67e274819 Added Gaussian implementation of various multivariate IT measures and unit tests. 2021-01-24 22:06:39 +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 d545793bc5 Patching unit test on KSG MI with discrete which tested that result changed from K=2 to 4, but the threshold for change was too large. 2019-07-25 10:14:57 +10:00
Joseph Lizier 0dae162d82 Added new unit tests for TE with k=0 for Gaussian and KSG estimators 2019-07-23 11:43:55 +10:00
Joseph Lizier fba941362d Adding further unit tests for Conditional TE (continuous-valued) to check different delays on conditional variables, and patching test of validity of calling univariate versus multivariate method signatures. 2019-07-12 14:45:23 +10:00
Joseph Lizier 681c9196ee Added methods to MatrixUtils (plus unit tests) for adding/removing/swapping sample points into existing means and covariances 2019-05-17 22:27:30 +10:00
Joseph Lizier ecec4d20e3 Added unit tests for linear dependency possibilities for issue #16 2019-03-31 23:22:55 +11:00
Joseph Lizier 988d32de70 Added bug fix within recent changes to MatrixUtils Cholesky decomposition calculation, along with unit testing of the linear dependency combinations for issue #17 2019-03-31 23:21:39 +11:00
Joseph Lizier d58c393c53 Added methods to MatrixUtils to make a Cholesky decomposition of independent components only (useful for MI and conditional MI calculations), with a required update to the NonPositiveDefiniteMatrixException to include a field defining which row in the matrix was a problem. Also includes code to convert between native int[] arrays and ArrayList<Integers>, and new method signatures for column selection from matricies.
Also added new unit tests for the Cholesky decomposition.
2019-03-28 23:52:47 +11:00
Pedro Martinez Mediano 4908276333 GPU tests and example now compute multiple surrogates. 2018-11-25 19:45:48 +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 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 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 fdec72aeff Added tracking of bias correction to ChiSquaredMeasurementDistribution, so the distribution is adjusted with bias correction. Should have been sent with previous commit for patch to CMI Gaussian bias correction 2018-08-27 00:29:59 +10:00
jlizier 7fafabe451 Extending MI discrete calculator to allow different bases for each variable. This necessitates immediate removal of the (int,int) constructor (where the 2nd argument was the time difference), this will now be confusing between (base, timeDiff) and (base1, base2). In time we may bring it back, after we can be reasonably comfortable people have switched away from using (base, timeDiff). 2018-06-20 10:55:21 +10:00
jlizier 5bde6f295b Fixes issue #70 by providing setObservations(double[], int[], double[]) methods for the mixed CMI calculators (i.e. allowing univariate arrays to be passed in if dimension 1 was defined for both the continuous data and conditional). Unit test validating is included. 2018-06-19 23:08:13 +10:00
jlizier fa9db58945 In AIS Gaussian unit test, switching property names for auto embedding to now reference the super class (AIS via Mutual Info) 2018-05-16 22:44:32 +10:00
jlizier 4ff4e4bfc9 Added unit tests for AIS Multivariate Gaussian calculator, including on auto-embedding, and that it functions ok for univariate data. 2018-05-16 22:43:46 +10:00
jlizier 1c591925bd Added auto-embedding to Gaussian AIS calculator, with both Ragwitz and maximum bias-corrected AIS methods. Bias-correction implemented via the Gaussian analytic surrogates. Involves defining new properties, setProperty, getProperty and preFinaliseAddObservations() to do the embedding. Unit test included also, mirroring unit testing for KSG AIS (which used linear Gaussian variables). 2018-05-15 17:35:06 +10:00
jlizier c0b9d736d7 Added methods to retrieve mean and standard deviation of the Chi^2 null distribution, as well as (empirical) unit test for this. 2018-05-13 22:02:46 +10:00
jlizier d1bba0e4c1 Adding computeLocalOfPreviousObservations() to continuous Entropy estimator interface and all underlying implementations. Added unit tests that locals should average back ok. Also fixing multivariate Entropy estimator interface to implement the univariate interface also (and fixing underlying implementations to comply) 2018-04-27 11:20:25 +10:00
Pedro Martinez Mediano c15c643a09 Added tests for new embeddings in univariate KSG TE calculator. 2018-04-22 22:25:40 +01:00
Pedro Martinez Mediano 03d5e2fb2f Added tests for new TE autoembedding methods. 2018-02-27 20:18:28 +00:00
Pedro Martinez Mediano d4c9b28973 Fixed error in KSG TE multivariate tester.
Tester was wrongly calling the univariate version of the algorithm using
the first column of the input.
2018-02-27 20:16:44 +00:00
Pedro Martinez Mediano 438a88c97c Added unittests for multivariate KSG TE autoembedding. 2018-02-27 17:56:42 +00:00
Pedro Martinez Mediano 08f25beee6 Add tests for new overloadings in KSG mixed calc. 2018-01-12 22:23:12 +00:00
Pedro Martinez Mediano 92f1154e3d Added smoke junit tests for GPU CMI reordering. 2017-12-19 20:43:25 +00:00
Pedro Martinez Mediano 4949a1079d Added junit KSG GPU CMI tests. 2017-12-18 17:51:03 +00:00
Pedro Martinez Mediano 1fb4015df5 Remove debug mode from junit GPU MI tests. 2017-12-18 17:43:15 +00:00
jlizier 142fbb4541 Merge branch 'master' of github.com:jlizier/jidt
Merging in Pedro's mixed Kraskov changes, plus further work on GPU for Kraskov MI
2017-11-24 15:30:20 +11:00
jlizier 1bb67f0840 Adding neighbour search utilities in preparation for attempting fast surrogate generation (performing multiple neighbour searches at once where we can); in particular adding a countPointsWithinR with a remapping of the point's indices. Unit test added as well for this. 2017-11-22 20:48:30 +11:00
Pedro Martinez Mediano 446ac4ae59 Merge branch 'master' into gpu 2017-11-21 14:58:15 +00:00
Pedro Martinez Mediano ecda70f8e9 Hard-setting dynCorrExclTime to 0 in KSG mixed calc.
Previous implementation was incomplete due to a mismatch between the
sample indices in the full and marginal KdTrees. Some code has been left
to guide future development.
2017-11-20 14:47: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 9aea9c4a02 Added some tests for KSG mixed setProperty. 2017-08-30 09:14:56 +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 1065662739 Added more tests to KSG mixed locals. 2017-08-16 14:51:33 +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
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
Pedro Martinez Mediano c0a4a283fa Added junit test for GPU MI calculation with non-zero exclusion window. 2017-05-31 04:20:38 +10:00