Commit Graph

250 Commits

Author SHA1 Message Date
Pedro Martinez Mediano 3c0ae81505 Added timers to kraskovCuda.c. 2017-05-24 17:28:20 +10:00
Pedro Martinez Mediano 1b1f4f9922 Added timers to gpuMILibrary. 2017-05-24 17:23:50 +10:00
Pedro Martinez Mediano bb241ae415 Added timers to gpuKnnLibrary. 2017-05-24 17:13:26 +10:00
Pedro Martinez Mediano ff868bf79f Added gpuWarmUp function to shorten latency in first GPU call. 2017-05-24 17:02:52 +10:00
Pedro Martinez Mediano cced321abb Renamed unit test source file. 2017-05-24 17:01:16 +10:00
Pedro Martinez Mediano 169c35e990 Makefile revamped. See comments:
- Added CUSTOMFLAGS to define flags from Make CLI.
- Separated and re-arranged C object targets.
- Added targets for test binaries.
2017-05-24 16:57:42 +10:00
Pedro Martinez Mediano 7d9d7ad135 Added MI calculation script for benchmarking purposes. 2017-05-24 15:48:19 +10:00
Pedro Martinez Mediano 3a64f2b926 Added lightweight inline timer for C functions. 2017-05-24 15:46:55 +10:00
Pedro Martinez Mediano 492cfe8b53 Added Java+JNI support for surrogate reorderings. 2017-05-23 16:19:33 +10:00
Pedro Martinez Mediano 4a31d3d7f1 Added C unit tests for surrogate reorderings. 2017-05-23 16:19:09 +10:00
Pedro Martinez Mediano 0b66c3a3f8 Added C support for arbitrary reordering of surrogates. 2017-05-23 16:18:16 +10:00
Pedro Martinez Mediano f2d6674a4f Added a few debug mode prints. 2017-05-23 05:13:57 +10:00
Pedro Martinez Mediano a7cef7f87f Added a few tests to check surrogate and pointset handling (more needed). 2017-05-23 02:11:02 +10:00
Pedro Martinez Mediano f7706f72bb Added missing includes and some test docs. 2017-05-23 02:10:31 +10:00
Pedro Martinez Mediano 0d555a34ca Separated chunk v. surrogate logic and cleared terminology and JNI bridge. 2017-05-23 02:09:24 +10:00
Pedro Martinez Mediano 5ba6cd093e Added proper source and header files for digamma implementation. 2017-05-23 02:06:08 +10:00
Pedro Martinez Mediano 001227c730 Added Java support for GPU surrogate calculation. 2017-05-22 15:03:32 +10:00
Pedro Martinez Mediano ad3454cce3 Added a few unit tests for full MI calculation with surrogates. 2017-05-19 18:19:35 +10:00
Pedro Martinez Mediano a11c1aa2eb Changed extern properties of header files. 2017-05-19 18:19:13 +10:00
Pedro Martinez Mediano cc47398d50 Remove spurious print statement. 2017-05-19 17:53:40 +10:00
Pedro Martinez Mediano 6e9ade6542 Separated core MI function to different files (and hacked Makefile). 2017-05-19 16:53:26 +10:00
Pedro Martinez Mediano 4b665d525f Improved variable initialisation and error handling. 2017-05-19 16:52:29 +10:00
Pedro Martinez Mediano b26695bf8a Separated main KraskovMI computation from JNI bridge. First steps towards GPU surrogates. 2017-05-19 12:39:17 +10:00
Pedro Martinez Mediano bdbe0ed659 Added unittest bin to make clean target. 2017-05-19 08:19:54 +10:00
Pedro Martinez Mediano 8dc6eced45 Added missing import statement. 2017-05-19 06:47:16 +10:00
Pedro Martinez Mediano 2fbe03f4ec Add a C (non-CUDA) wrapper on cudaDeviceReset for easier compilation. 2017-05-19 06:46:06 +10:00
Pedro Martinez Mediano d7fa6814dd Improved error handling when loading GPU library. 2017-05-19 06:14:31 +10:00
Pedro Martinez Mediano 57aa4e95ee Add new property for users to specify custom path to GPU library. 2017-05-19 06:01:45 +10:00
Pedro Martinez Mediano 1abd5a084e Add manual casting of jobject to jdoubleArray. 2017-05-19 05:38:37 +10:00
Pedro Martinez Mediano dd83cd9ef1 Add tests for CUDA range search function. 2017-05-19 03:21:11 +10:00
Pedro Martinez Mediano 8675858e98 Moarr tests. 2017-05-19 02:16:15 +10:00
Pedro Martinez Mediano 470090321e Added a few initial C++ unit tests and new make target. 2017-05-19 01:41:43 +10:00
Pedro Martinez Mediano 55e74e6ede Added lest framework for C++ unit tests. 2017-05-19 01:40:54 +10:00
Pedro Martinez Mediano 004a7c7f17 Added separate ant tasks for GPU compilation, moved libraries to bin folder. 2017-05-18 02:49:31 +10:00
Pedro Martinez Mediano 1dec066188 Add FORCE_INLINES define to makefile for compatibility with new cuda. 2017-05-17 00:49:15 +10:00
Pedro Martinez Mediano d1c45866fb Added new JNI include paths to work with java 8. 2017-05-16 22:01:38 +10:00
Pedro Martinez Mediano 0e407a784a Added explicit sm_30 compile flags. 2017-05-16 22:01:15 +10:00
jlizier 62069dab16 Added several utilities for selecting columns to MatrixUtils 2017-03-23 14:31:38 +11:00
jlizier bf3f26cf18 Patching TE Calculator Multivariate via conditional mutual info, which was not running (at all) for proper multivariates. Now splits the handling of solely univariate data from multivariates. 2017-03-23 14:31:03 +11:00
jlizier eb83262172 Add an analytic MI surrogate distribution computation to the Linear-Gaussian Active Information Storage estimator 2017-03-23 14:29:16 +11:00
jlizier 1e982ddbac Adding computeLocalFromPreviousObservations() calls for univariate time series to the ConditionalTransferEntropyCalculatorDiscrete (I'm not sure why they were missing) 2016-11-22 20:59:12 +11:00
jlizier 9a7ff306c8 Adding utilities for fast nearest neighbour searchers to handle calculations on new samples and prepare for conditional MI fast surrogates computation 2016-10-20 09:26:12 +11:00
jlizier 3118e57384 Making conditional MI calculators (continuous) handle empty conditionals, and properly normalise new data according to the old (except for linear Gaussian calculator, which explicitly bars normalisation now). 2016-10-18 13:21:29 +11:00
jlizier e0fb7de856 Added auto-embedding method for AIS and TE Kraskov (KSG) calculators which maximises the bias-corrected AIS. This commit includes the AIS and TE calculators themselves, an update to the TE auto analyser (with comments on the auto embed method property) 2016-10-18 12:52:31 +11:00
jlizier 0ed74612a7 Altering kernel estimator classes so that the return values for getProbability are proper probability densities rather than probabilities (by now dividing by the kernel diameter/volume). This patches the EntropyCalculatorKernel and the EntropyCalculatorMultiVariateKernel to properly return differential entropy, as advertised. Makes no difference to the MI and TE kernel calculators, as they use counts anyway rather than probability densities. 2016-10-18 11:56:38 +11:00
jlizier 7d28e93913 Bug fix in mixed Kraskov implementation for computeUsingPreviousObservations (picked up by Rose Wang). Also acknowledged that this implementation is (mostly) as per Ross 2014. 2016-10-18 00:18:37 +11:00
jlizier 9785e2a71f Enabled Active Info Storage calculators (continuous) to have addObservations() methods with validity supplied 2016-10-18 00:11:33 +11:00
jlizier 16239d3c3e Added method getSeparateNumObservations() to return a list of how many samples were pulled from each addObservations call, to make reconstructing/separating local values easier subsequently 2016-10-18 00:00:31 +11:00
jlizier 08d380398b For MultiInfoCalculatorDiscrete added simple interface for adding joint observations 2016-10-17 16:32:18 +11:00
jlizier 77cf8e5f8e Major update to TransferEntropyCalculatorDiscrete so as to implement arbirtray source and dest embeddings and source-dest delay. Also included are associated unit tests, and modifications to MatrixUtils to support these. 2016-10-17 16:22:59 +11:00
Pedro Martinez Mediano 2654e848ae Add new MultiInformationCalculatorGaussian.
At the moment is supports local measures, but not automatic significance
calculation. For that the method needs to be cloneable.
2016-10-13 23:58:32 +01:00
Pedro Martinez Mediano a721f26734 Discrete conditional TE now supports different bases for each variable.
Also added some generic unit tests.
2016-06-01 18:54:57 +01:00
Pedro Martinez Mediano c40b8ae80c Merge branch 'master' into gpu 2016-05-19 16:19:47 +01:00
Pedro Martinez Mediano 08bb2dd609 Fix bug in TE multivariate. 2016-05-07 10:27:13 +01:00
Pedro Martinez Mediano 6f87aed980 Added preliminary version of Ragwitz optimization in multivariate AIS calculator. 2016-04-19 18:22:02 +01:00
Pedro Martinez Mediano 99a856cd8c Merge branch 'master' into gpu
Conflicts:
	build.xml
2016-03-15 23:04:00 +00:00
Pedro Martinez Mediano 3da629a817 Preliminary commit of multivariate AIS calculators and unit tests. Fully functional, but not tested enough. 2016-03-15 22:36:12 +00:00
Pedro Martínez Mediano 5074c1b6f7 Initial commit of GPU code. 2016-03-13 01:15:19 +00:00
joseph.lizier dbd1dcdd54 Fixing the bias correction on our experimental discrete-continuous KSG calculators 2015-07-19 17:19:59 +00:00
joseph.lizier f6c8d26bf8 Minor fixes to default values of TE calculator properties, and adding error messages for array file reading 2015-07-09 14:38:23 +00:00
joseph.lizier bb587fa345 Also allowing the KSG calculators noise property to be set to "false" to indicate 0 noise. 2015-06-16 12:27:56 +00:00
joseph.lizier c4fc334c3a Adds a small (1e-8) amount of noise to all data for the Kraskov calculations by default. Fixes Issue 42. 2015-06-16 12:01:41 +00:00
joseph.lizier 90fd9fbe89 Adding auto embedding via Ragwitz criteria for Kraskov Transfer Entropy calculator. This fixes Issue 38.
Also patched AIS calculator to handle observations supplied with validity indicator when auto embedding is undertaken.
2015-06-05 06:50:03 +00:00
joseph.lizier 62228651bc Adding getProperty() method to all conditional MI calculators and TE calculators (except for multivariate versions at this stage), in readiness for automated embedding being added to TE Kraskov to partially fix Issue 38 2015-06-04 04:27:23 +00:00
joseph.lizier 687978103c Added auto-embedding with Ragwitz criteria to AIS Kraskov calculator, partially addressing Issue 38. Also adds getProperty() method to AIS calculators and MI calculators. 2015-06-04 03:48:55 +00:00
joseph.lizier b4b94b1940 For Interregional Transfer demo, adding option for data files to be specified on command line 2015-05-28 02:43:34 +00:00
joseph.lizier f0cbb61197 Fixing Javadoc commentsin MI calculators 2015-02-05 23:39:22 +00:00
joseph.lizier 79db42274c Added methods for computing MI/TE etc in Multivariate calculators on only univariate time series (double[]) when the calculators have been initialised for dimension 1 in source and destination 2015-01-23 03:11:35 +00:00
joseph.lizier 21d1e68ba7 Bug fix for Kraskov conditional MI algorithm 2 -- kdTrees for var1 and conditional, as well as var2 and conditional, were only being passed the radii for var1 (or var2) but not the radius of the conditional as well. This doesn't seem problematic at face value, however in traversing the tree the wrong radius was being used at levels corresponding to the conditional(s) in checking those nodes and determining whether their children needed to be traversed as well. Patched by implementing a new method in KdTree to take all radii in the situation where one variable has already been checked. Fixes issue 39. 2015-01-21 12:23:09 +00:00
joseph.lizier 733da8265d Dynamic correlation exclusion, or Theiler window, added to all Kraskov estimators, i.e. Mutual Info, Conditional MI, Multi-info, and thereby the derived classes including transfer entropy. Fixes issue 35 2014-11-25 12:31:44 +00:00
joseph.lizier 82ff884b99 Explicitly setting return array values in Kraskov conditional MI calculator algorithm 2. 2014-11-14 10:27:48 +00:00
joseph.lizier 24a0566fd4 Patching bug in digamma function which is susceptible to race condition in multi-threaded applications. Also explicitly setting return array values in Kraskov calculators. 2014-11-14 10:24:53 +00:00
joseph.lizier ba537e948a Enhancements to fast nearest neighbour searching for conditional mutual information; utilises points found matching the conditional search criteria in the joint conditional with var1 and var 2 searches. 2014-11-04 00:57:26 +00:00
joseph.lizier 57fafd1551 Adding more methods to nearest neighbour search classes to return collections of points within ranges via arrays, and to use additional criteria in searching or take arguments for one variable that has already been tested. Utilising these new searches within Conditional MI Kraskov estimator algorithm 1 2014-11-03 04:57:24 +00:00
joseph.lizier 32c062f880 Inlining norms in Nearest Neighbour search classes, and adding methods to return Collections of points within ranges 2014-10-31 12:02:54 +00:00
joseph.lizier 2a56301b75 Kraskov multi-info calculators use fast neighbour search and common multi-info class. 2014-10-30 04:21:12 +00:00
joseph.lizier ed6150c6a3 Additional operations added to multi-info interface for continuous data, and pulled common operations into a common class (revamped Kernel calculator rewritten to use this) 2014-10-30 04:18:04 +00:00
joseph.lizier 6ade6d4311 Adding fast nearest neighbour searcher for univariate data (uses only a sorted array rather than whole k-d tree). Adds an abstract nearest neighbour searcher so calling classes don't necessarily need to know whether they're dealing with uni or multi-variates. MI and conditional MI Kraskov altered to use this where possible. 2014-10-30 04:04:16 +00:00
joseph.lizier bf94191282 Fixes issue 34 -- adds predictive information calculators for continuous variables; interface definition, common code via abstract mutual information calculator, and implementations for Gaussian, kernel and KSG estimators. 2014-10-16 00:31:41 +00:00
joseph.lizier 9c05f4693a Fixes issue 32 -- adds fast neighbour search to Kraskov conditional MI calculators (and by implication to TE calculators). Requires adding a neighbour search within different radii for each variable to the k-d tree class. 2014-10-15 10:36:58 +00:00
joseph.lizier 1fb3735e58 Bug fix re issue 31 -- ensuring that kd trees get rebuilt for surrogate TE calculations. 2014-10-15 05:06:30 +00:00
joseph.lizier bc2783b971 Fixes issue 31 -- implementing fast nearest neighbour search for Kraskov MI using a k-d tree structure. 2014-10-15 04:48:09 +00:00
joseph.lizier feb0f320ae Minor updates to javadocs regarding Active Info Storage Calculators. 2014-09-16 03:27:28 +00:00
joseph.lizier 5d16028f5b Fixes issue 13 -- by adding normalise option to Kraskov multi-information. Also Fixes issue 26 -- by adding a property for adding noise to the data (which was already done for Kraskov MI and conditional MI) 2014-09-16 01:55:22 +00:00
joseph.lizier 70bcc7c922 Mirrors multi-threading from Kraskov MI calculators to Kraskov conditional MI calculators, and so fixes issue 29. Also adds some minor modifications to multithreading code for Kraskov MI calculators. 2014-09-16 01:36:39 +00:00
joseph.lizier 0db37c9160 Making multithreading on Kraskov MI calculators the default (using all available processors), and also adding some more debug statements. 2014-09-12 12:10:42 +00:00
joseph.lizier 957adeccd5 Fixes issue 28 - achieves multithreading on Kraskov MI calculators, merging code from Ipek and altering the design. Also partially addresses issue 24 by switching digamma for large arguments over to commons.math 2014-09-12 07:35:05 +00:00
joseph.lizier 6e100c65d0 Added property for Kraskov Conditional MI calculator to add a small amount of noise to the input data. For Kraskov MI calculator, changed this to add the noise in after the data is (potentially) normalised, so the magnitude corresponds to a number of standard deviations of the original data. 2014-09-11 03:43:40 +00:00
joseph.lizier 0767e2e57e Tweaks to javadocs 2014-08-14 06:26:06 +00:00
joseph.lizier 916b6d5c34 Small javadoc modification 2014-08-14 05:57:20 +00:00
joseph.lizier 76a274094f Appending suffix "Discrete" to all discrete calculators. Step 3 -- refactoring java files for Separable info. All done for source code now 2014-08-14 03:05:28 +00:00
joseph.lizier f2c5ba4771 Appending suffix "Discrete" to all discrete calculators. Step 2 -- refactoring java files, which has flow on effects to other java files. All fixed here. 2014-08-14 03:00:15 +00:00
joseph.lizier 752b2fdb23 Appending suffix "Discrete" to all discrete calculators. Step 1 -- just changing file names 2014-08-14 02:43:31 +00:00
joseph.lizier e7b8958fda Adding package-info.java files for Javadocs for the various packages 2014-08-13 15:36:10 +00:00
joseph.lizier 4f8137b449 Minor corrections to Javadocs for the continuous package 2014-08-13 15:20:00 +00:00
joseph.lizier b68d77e18e Rudimentary Javadocs completed for the utils package 2014-08-13 15:18:47 +00:00
joseph.lizier b916ac08e8 Javadocs noted as incomplete, and indeed the code itself experimental, for mixed package. 2014-08-13 14:53:57 +00:00
joseph.lizier 8ea3368224 Javadocs finalised for discrete package. Also added some new methods to ChannelCalculator, SingleAgentMeasure, EntropyRateCalculator, ActiveInfoStorageCalculator made to inherit/extend from SingleAgentMeasureInContextOfPastCalculator. 2014-08-13 14:42:56 +00:00
joseph.lizier 1ecdd8829f Extra imports to fix Javadoc references 2014-08-13 03:48:54 +00:00
joseph.lizier 0e598bf81e In mixed.kraskov estimators switched to use 4 nearest neighbours by default (as recommended by Kraskov et al.), and Kraskov2 algorithm for conditional MI fixed to match Wibral et al. equation (as per the continuous calculator) 2014-08-13 02:57:54 +00:00