Commit Graph

586 Commits

Author SHA1 Message Date
David Shorten 064953c584 bit of cleaning up 2018-12-11 15:18:51 +11:00
David Shorten b467ea22a1 option of using same K for dest history 2018-12-11 15:15:26 +11:00
David Shorten 9f51dc284c option of not doing radius trimming 2018-12-11 12:21:27 +11:00
David Shorten 6f8ae62fee option of excluding the point itself 2018-12-11 12:03:44 +11:00
David Shorten 267796dc83 forced inclusion of TransferEntropyCalculatorSpikingIntegration.java 2018-12-10 20:29:54 +11:00
David Shorten ec01683592 Incorporated JL code from 21/11/2018 2018-12-10 20:22:15 +11:00
David Shorten fa9a45a9cf added in the original spiking estimator code 2018-12-10 17:12:15 +11:00
Pedro Martinez Mediano 4908276333 GPU tests and example now compute multiple surrogates. 2018-11-25 19:45:48 +02:00
Pedro Martinez Mediano c616ba55d4 Added link to wiki in GPU loader error message. 2018-11-25 19:25:33 +02:00
jlizier 16015e0f12 Nearest neighbour searchers now return number of points found for findPointsWithinR as well as marking them in input arrays. Also added new method sumDistanceAboveThresholdForPointsWithinRs() for the univariate searcher (to be used in spiking TE estimator under development) 2018-11-24 21:16:36 +11:00
David Shorten af7fbd6c37 added spiking measures 2018-11-19 15:55:24 +11: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 af1173ba5b Patching local MI discrete computation when we have a time difference of > 0 (we were getting an ArrayIndexOutOfBoundsException before) 2018-09-05 13:43:21 +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 f502497256 Added bias correction option to AutoAnalyser GUI for Gaussian AIS, TE and CTE estimators 2018-08-27 13:19:00 +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 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 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 b1a02be7db Adding sanity check that discrete ContextOfPastMeasure (and child classes, including AIS and TE) have k >= 0. 2018-08-26 22:48:37 +10:00
jlizier dc08e1c372 Catching OutOfMemoryError in Discrete calculator creation for all other discrete calculators (only MI was done in the previous commit). Also simplified constructor calls (with code re-use) for conditional TE. 2018-08-25 22:27:29 +10:00
jlizier 93c767999e Catching OutOfMemoryError in Discrete MI calculator creation 2018-08-25 20:59:05 +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 7f4dfa7970 Added bias correction property for Gaussian MI to AutoAnalyser GUI 2018-08-22 16:00:52 +10:00
jlizier 323ef47475 Adding auto-embedding properies to AutoAnalyser GUI Active Info Storage for all continuous calculators (was only in KSG before) 2018-08-22 15:53:09 +10:00
jlizier 4b6fc39c72 Fixed tool tip pop-ups for Discrete and Binned estimators in AutoAnalyser GUI (they were using spurious values from a continuous calculator before) 2018-08-21 20:56:58 +10:00
jlizier 8c5aa51f57 AutoAnalyser: Added drop-down menus (aka comboboxes) for parameters whose values are amenable to selection in this way. All child classes updated to be compatible. GUI size adjusted here also. 2018-06-26 12:22:05 +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 4170339426 Moving check of dimensionality for continuous variables in mixed CMI calculator common to the main setObservations() method 2018-06-19 23:57:41 +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 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 643212840a Making indenting style consistent through file 2018-05-18 08:56:47 +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 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
jlizier a649b38270 Patched new section of AIS calculator via MI, whereby addObservationsWithGivenParams() when called with a validity[] array did not compute valid start and end time pairs for the candidate k and tau, but did so for the k and tau set in the properties. Fixed so that the candidate k and tau can be supplied. 2018-05-16 14:39:54 +10:00
jlizier e8603b08f8 Moving auto-embedding for AIS (Ragwitz and maximum bias-corrected AIS methods) from out of Gaussian and KSG calculators and into the common AIS calculator via MI class. The common implementation then allows us to introduce auto-embedding for the AIS kernel estimator as well (included requiring adding a property for the number of surrogates to use to compute the bias for this one).
These changes now incorporate auto-embedding for all AIS continuous calculators, partially addressing issue #38
2018-05-16 14:20:08 +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 48b48ab845 Changing AIS Via Mutual Info internal addObservationsAfterParamsDetermined method to addObservationsWithGivenParams - taking k and tau as arguments rather than using the internal ones. This allows the method to be called by auto-embedding in the child classes as well (better code re-use ready for extending auto-embedding) 2018-05-15 17:32:50 +10:00
jlizier 9552091fca Adding Javadoc on header for neighbour counts method in KSG MI estimator 1 2018-05-15 17:28:39 +10:00
jlizier 0b70e92efc Added Bias-correction property to Gaussian MI and conditional MI calculators, including set and getProperty and an implementation in the calculations. This implements bias-correction by substracting the bias (of the analytic chi^2 based null distribution) from the calculations. 2018-05-13 22:29:17 +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 46a9785da2 In surrogates for MI and CMI also turning adding noise off since this will have been done in the initial calculation already, and will just broaden the noise here. 2018-05-12 22:35:54 +10:00
jlizier 28ba409ff6 Turning off normalisation when computing surrogates in Common CMI and MI calculators, because normalisation has already been carried out (and if one variable had no variance, this will inflate the values back to original scale) 2018-05-12 21:30:39 +10:00
jlizier 0e4455b2fd Corrects the access at one point to the bins for the data points in the multivariate kernel estimator, which should use an IntArray object but did use an int[] object to access . Fixes #69. 2018-05-10 20:20:02 +10:00
jlizier 860d43dbca Adding additional error message for Exception during KSG Active Info Storage auto-embedding 2018-05-07 23:15:33 +10:00
jlizier 1f625b59f0 AutoAnalyser: fixing bug where column numbers for data are all set to zero if the user unclicks the "compute result?" button 2018-05-07 22:57:10 +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
jlizier bf0062b902 Switching new debug method in KSG conditional MI calculator 1 to be publicly accessible 2018-04-26 11:43:04 +10:00
jlizier 7d76f82bb2 Adding partialNeighbourCountFromObservations() method to KSG conditional MI calculator 1 for debugging investigations into the neighbour counts 2018-04-26 11:24:56 +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 df8eec27cd Added MAX_CORR_AIS_AND_TE embedding to univariate KSG TE calculator. 2018-04-22 22:25:05 +01:00
Pedro Martinez Mediano f8bca3275d Fixed docs for new MAX_CORR_AIS_AND_TE embedding method. 2018-04-22 20:45:06 +01:00
Pedro Martinez Mediano 02dad26a94 Added brief mention of AUTO_EMBED_METHOD_MAX_CORR_AIS_AND_TE to javadocs. 2018-02-27 20:29:39 +00:00
Pedro Martinez Mediano 03d5e2fb2f Added tests for new TE autoembedding methods. 2018-02-27 20:18:28 +00:00
Pedro Martinez Mediano 5f6671aa2b Added AUTO_EMBED_METHOD_MAX_CORR_AIS_AND_TE to multivariate KSG TE. 2018-02-27 20:18:04 +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 550ff793eb Fixed bug in KSG TE multivariate embeddings and setObservations. 2018-02-27 20:14:08 +00:00
Pedro Martinez Mediano 438a88c97c Added unittests for multivariate KSG TE autoembedding. 2018-02-27 17:56:42 +00:00
Pedro Martinez Mediano 8be6a037af Added auto-embedding methods to multivariate KSG TE calculator. 2018-02-25 19:23:09 +00:00
Pedro Martinez Mediano ce4b1599c6 Added MAX_CORR_AIS embedding method to multivariate KSG AIS. 2018-02-25 18:57:15 +00:00
Pedro Martinez Mediano 75bb2c814a Added addObservations-related methods to multivariate TE calculators.
This is needed to implement auto-embedding methods later.
2018-02-25 18:54:36 +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 b0fc309d6a Add overloadings for 1d continuous variables in KSG mixed calc. 2018-01-12 22:22:46 +00:00
jlizier 0278f95ae9 Enabled use of USE_GPU property for KSG calculators in the AutoAnalysers for CMI, TE, CTE and AIS 2017-12-30 12:03:17 +11:00
Pedro Martinez Mediano 92f1154e3d Added smoke junit tests for GPU CMI reordering. 2017-12-19 20:43:25 +00:00
Pedro Martinez Mediano 64f1142b40 Added argument to choose which variable to reorder in GPU CMI code. 2017-12-19 20:42:58 +00:00
Pedro Martinez Mediano 65ac0e9ff8 Removed unnecesary overloaded method in KSG CMI calc. 2017-12-19 20:41:11 +00:00
Pedro Martinez Mediano 4949a1079d Added junit KSG GPU CMI tests. 2017-12-18 17:51:03 +00:00
Pedro Martinez Mediano 2f1cd192b8 Fixed small typo in Java KSG CMI calculator. 2017-12-18 17:50:37 +00:00
Pedro Martinez Mediano 1fb4015df5 Remove debug mode from junit GPU MI tests. 2017-12-18 17:43:15 +00:00
Pedro Martinez Mediano d0304ae0c4 Added Java-side JNI functions and ensureKdTreesConstructed to KSG CMI. 2017-12-12 11:19:40 +00:00
Pedro Martinez Mediano f4ca442de4 Now KSG MI calc does not build KdTrees if GPU is going to be used. 2017-12-12 11:10:50 +00:00
Pedro Martinez Mediano d010f32635 Updated getProperty and removed spurious dependency in KSG MI calc. 2017-12-12 11:04:32 +00:00
Pedro Martinez Mediano eabd7f3701 Fixed typo in Kozachenko entropy calculator. 2017-11-28 16:58:13 +00:00
Pedro Martinez Mediano 444fb70801 Added addObservations-type functions to Kozachenko entropy calculator. 2017-11-28 16:56:51 +00:00
Pedro Martinez Mediano e290040d8d Added docs to Kozachenko entropy calculator. 2017-11-28 16:26:46 +00:00
Pedro Martinez Mediano 35df6ca3da Kozachenko entropy estimator now adds noise to data by default. 2017-11-28 16:04:09 +00:00
jlizier 9c96ceb850 Fixed logic for when parameter values (in particular auto-embedded properties) are written back into the properties table after the calculation. This was happening only when we had the "all pairs" option selection, when it should only happen when this is not selected. 2017-11-28 12:36:06 +11:00
jlizier 589d51674e Altering the escaped data filename in AutoAnalyser to be properly escaped using non-regex replace, and also rolling back the use of escaping to only Java (Matlab and Python on windows seem fine with the non-escaped filenames, for e.g. the paths earlier in the generated code) 2017-11-27 10:19:36 +11:00
jlizier 3bfbaa7ad3 In AutoAnalyser escaping data filenames when they are written to the generated code. This is important for windows filenames. Am not sure why it didn't come up before as an issue though. 2017-11-27 09:57:07 +11:00
jlizier 61f4bf3276 Adding getProperty lines to handle USE_GPU property for KSG MI calculator 2017-11-27 09:26:19 +11:00
jlizier db0503d763 Having AutoAnalyser continue with the calculation where the generated code cannot be written 2017-11-26 18:04:29 +11:00
jlizier df8724b872 Altered AutoAnalyserLauncher to either auto-detect jar location or assume demos/AutoAnalyser folder is current location (if a command line argument is given). Similarly, altered AutoAnalyser to either take location of demos/AutoAnalyser folder, or assume it is the current folder. 2017-11-26 01:10:30 +11:00
jlizier fd804d0d0c Added properties for running GPU calculation to MI AutoAnalyser 2017-11-26 01:07:19 +11:00
jlizier 69af7252cd Added debug print on working directory to AutoAnalyser startup 2017-11-25 00:15:37 +11:00
jlizier ddf3b4de0a Moving AutoAnalyser java files into the main source location rather than in the demos location. This commit includes the moving of the files themselves. Further commits will alter the ant script and run scripts to have correct classpath, etc. 2017-11-24 21:07:33 +11: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 9e77ebdadf Tweak to method to print out an array of ints 2017-11-22 20:49:05 +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
Joseph Lizier c5c38335ef
Merge pull request #58 from pmediano/master
Major improvements to KSG mixed (continuous-discrete) MI calculator.
2017-11-22 00:23:10 +11: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 25df49fa5a KSG mixed calc now allocates memory for locals only if requested. 2017-11-20 14:26:25 +00:00
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
jlizier 0e27dbcbc2 Fixed default value of dynamic exclusion window in Kernel MI calculator to be 0. Technically it is zero (because dynCorrExcl boolean is set to false, but gets reported as 100 because the integer value of dynCorrExclTime was not set to 0 itself) 2017-09-02 20:18:36 +10:00
Pedro Martinez Mediano ed71502bc2 Remove old cudaLibraryLoad code and unnecessary dependencies. 2017-08-31 16:22:12 +01: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