Commit Graph

586 Commits

Author SHA1 Message Date
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
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
jlizier a2b9939892 Merge branch 'master' of github.com:jlizier/jidt
to combine local changes with Pedro's GPU pull
2017-06-13 12:08:54 +10:00
jlizier 77f4c1afd5 Added partialNeighbourCountFromObservations() method for Leo's analytic work on neighbour counts 2017-06-13 12:04:41 +10:00
jlizier 4b8e26fc05 Changed various computeLocal methods from private to public (these were mistakenly private) 2017-06-13 12:03:56 +10:00
Pedro Martinez Mediano d0b35b3db8 Added NativeUtils for native lib loading and included libKraskov.so in jar. 2017-06-01 20:34:23 +10:00
Pedro Martinez Mediano 834a3ec2c2 Relocated GPU code and modified build and load paths accordingly. 2017-06-01 17:22:42 +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
Pedro Martinez Mediano 2a203faa23 Added support for Theiler exclusion window in JNI code. 2017-05-31 04:19:49 +10:00
Pedro Martinez Mediano bc44e4c2fb Main workflow now operates using only device functions.
This saves time and energy by keeping all data in te GPU, rather than
transfering it back and forth all the time.
2017-05-31 02:38:44 +10:00
Pedro Martinez Mediano 85dd28d13b Separated digamma and reduction into host and device functions. 2017-05-31 02:36:45 +10:00
Pedro Martinez Mediano 7a89dd7908 Modified handling of normFunction and replaced signallength with signalLength. 2017-05-31 02:35:11 +10:00
Pedro Martinez Mediano 6c25ea93ef Added functions to allocate and free all the GPU memory at once. 2017-05-31 02:31:37 +10:00
Pedro Martinez Mediano 721c96c040 Added prototypes of device functions to gpuKnnLibrary header. 2017-05-30 23:00:17 +10:00
Pedro Martinez Mediano c9d6a8a3bc Now Makefile finds compute capabilities of all GPUs in the system. 2017-05-30 17:39:06 +10:00
Pedro Martinez Mediano 6645653ab3 Added unit tests for GPU digamma calculation and block reduction. 2017-05-30 01:37:43 +10:00
Pedro Martinez Mediano 75a03341b9 Separated digamma and reduction into host and device functions, now doing block reduction in device. 2017-05-30 01:36:56 +10:00
Pedro Martinez Mediano f4ef357a84 Multiple improvements to increase portability of GPU build system.
- Checks CUDA and nvcc are available, otherwise exit nicely.
- Automatically looks for JNI header files.
- Automatically checks GPU-specific compute capability flags.
2017-05-30 01:24:43 +10:00
Pedro Martinez Mediano 180e5cbf45 Minor rearrangements in digamma functions. 2017-05-29 09:20:29 +10:00
Pedro Martinez Mediano 727a76fe94 Renamed cudaSumDigammas function. 2017-05-29 09:18:00 +10:00
Pedro Martinez Mediano 7eb91957ce Remove old comments. 2017-05-29 09:11:08 +10:00
Pedro Martinez Mediano 4b374de8c1 Added function to calculate and sum digammas fully on GPU to the main workflow. 2017-05-29 09:10:33 +10:00
Pedro Martinez Mediano 34c9ebd6ad Added CUB library of low-level CUDA primitives. 2017-05-28 02:40:56 +10:00
Pedro Martinez Mediano a5e3d18e6a Separated RS function in host and device sections. 2017-05-28 02:07:55 +10:00
Pedro Martinez Mediano fb01036127 Separated kNN function in host and device sections. 2017-05-28 01:55:55 +10:00
Pedro Martinez Mediano 0845420fdf Rearranged function order in gpuKnnBF_kernel. 2017-05-28 01:53:30 +10:00
Pedro Martinez Mediano 502289d666 Replaced manual absolute value calculation with CUDA Math API fabsf. 2017-05-27 04:23:03 +10:00
Pedro Martinez Mediano 0d296c854c Fix minor warnings. 2017-05-27 04:20:45 +10:00
Pedro Martinez Mediano d94a373ca8 Added warning flags to Makefile. 2017-05-27 04:20:11 +10:00
Pedro Martinez Mediano 1beb7a47fc "extern C" qualifiers now surround all gpuKnnLibrary as a whole, instead of in every function. 2017-05-26 04:58:18 +10:00
Pedro Martinez Mediano 36d821979d Renamed gpuKnnLibrary.cu to .c. Now .cu extension is reserved for files with kernels. 2017-05-26 04:55:13 +10:00
Pedro Martinez Mediano 56771c94b4 Minor change to timing tags in perftest. 2017-05-26 04:54:05 +10:00
Pedro Martinez Mediano 91b1235380 Added statistical unbiasedness tests for C permutation function. 2017-05-25 15:16:20 +10:00
Pedro Martinez Mediano d8779ee9f5 Added randperm to gpuMILibrary header so that it can be seen by other files. 2017-05-25 15:16:00 +10:00
Pedro Martinez Mediano 94bcfc1477 Added conditional to Java GPU tests to ignore test if GPU disabled. 2017-05-25 02:57:13 +10:00
Pedro Martinez Mediano 6af0e22030 Merge branch 'master' into gpu 2017-05-25 02:44:59 +10:00
Pedro Martinez Mediano a642c0a8c8 Fix prints in digamma timers. 2017-05-25 02:29:07 +10:00
Pedro Martinez Mediano 79859e0832 Add warm-up period to benchmarking script. 2017-05-25 02:15:21 +10:00
Pedro Martinez Mediano c8ceec9f71 Added more timers and unified format a bit. 2017-05-25 01:41:53 +10:00
Pedro Martinez Mediano cce345b0ed Removed comments and prints from perftest.cpp 2017-05-25 01:09:34 +10:00
Pedro Martinez Mediano 3fb9632439 Improved ctimer to align printf outputs. 2017-05-25 01:06:04 +10:00
Pedro Martinez Mediano 82c06abbeb Added C unit tests for GPU digamma reduction. 2017-05-25 00:20:52 +10:00
Pedro Martinez Mediano 715050d4e6 Added GPU chunk digamma reduction to main workflow. 2017-05-25 00:20:06 +10:00
Pedro Martinez Mediano 2d8d0271ca Added first version of GPU chunk digamma reduction function.
For now the calculation of the digammas is fully parallel but sums are
done in CPU.
2017-05-25 00:19:07 +10:00
Pedro Martinez Mediano afcfb61260 Added C unit test for GPU digamma calculation without reduction. 2017-05-24 23:28:41 +10:00
Pedro Martinez Mediano 20c019267c Added full C function for parallel digamma calculation without reduction. 2017-05-24 23:27:41 +10:00
Pedro Martinez Mediano ada9128389 Added kernel for gpu digamma calculation without reduction. 2017-05-24 23:26:33 +10:00
Pedro Martinez Mediano 7fe8bf47cc Added GPU digamma reduction to main workflow for single-chunk cases. 2017-05-24 22:19:36 +10:00
Pedro Martinez Mediano e39afcd5b4 Fixed bug related to manual casting in digamma reduction kernel. 2017-05-24 22:19:07 +10:00
Pedro Martinez Mediano 3a68e27af8 Fixed bugs in single-chunk digamma reduction GPU code. 2017-05-24 22:18:04 +10:00
Pedro Martinez Mediano 3dd4f6b224 Added C unit tests for single-chunk GPU digamma reduction. 2017-05-24 22:16:18 +10:00
Pedro Martinez Mediano b2c42563d0 GPU junit tests now run without debug mode to reduce printed statements.
The debug statements are left commented for future reference.
2017-05-24 22:14:46 +10:00
Pedro Martinez Mediano 991ef30a1e Removed spurious array print. 2017-05-24 22:13:19 +10:00
Pedro Martinez Mediano 09548028e0 Merge remote-tracking branch 'ghub/master'. This merges Joe's v1.3.1 master into Pedro's master. 2017-05-24 20:24:32 +10:00
Pedro Martinez Mediano 3054461f7a Add note for potential further optimisation. 2017-05-24 19:45:01 +10:00
Pedro Martinez Mediano d17d8cad03 Add small utility script to profile parts of GPU code. 2017-05-24 19:20:54 +10:00
Pedro Martinez Mediano 8da0bfc17b Fixed bugs in pointset arrangement. Inefficient but functional. 2017-05-24 18:52:37 +10:00
Pedro Martinez Mediano 39a5cadf06 RS functions now receive pointers to source/dest within pointset.
This helps with surrogate calculation and is convenient for later memory
optimisation.
2017-05-24 18:04:11 +10:00
Pedro Martinez Mediano 4cb9a9bb16 Fixed bug with surrogate digamma calculation. 2017-05-24 18:02:38 +10:00
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 63f26a60fa Added Java+C tests for reorderings and random permutations. 2017-05-24 17:06:04 +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 c33436e69a Added Junit tests for surrogate reorderings. 2017-05-23 16:19:52 +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 9b455f7ef4 Added first few GPU performance tests to measure speed-up wrt CPU. 2017-05-22 15:05:43 +10:00
Pedro Martinez Mediano 001227c730 Added Java support for GPU surrogate calculation. 2017-05-22 15:03:32 +10:00
Pedro Martinez Mediano 118e32d9ad Separated GPU MI unit tests to separate file. 2017-05-22 14:49:21 +10:00
Pedro Martinez Mediano 71589d1150 Added Java+C tests to check consistency of local MI calculations. 2017-05-19 18:20:03 +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 5a07352969 Add unit tests inside Java for GPU code. 2017-05-19 06:39:57 +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 c311067fe6 Extending unit test for multivariate TE calculator to compare ensemble and setObservations methods 2017-03-24 23:27:53 +11: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 b0d48bc96c Unit tests for conditional MI on new observations, and for no conditionals 2016-10-20 09:29:56 +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 05beb63e58 Added unit test for AND function 2016-10-18 15:05:28 +11:00
jlizier 4cac043aff Added unit test for TE continuous getSeparateNumObservations (in Kraskov class) 2016-10-18 15:05:15 +11:00
jlizier e2182c40c2 Update to AIS kernel direct class in unit tests to align with update to AIS interface definition 2016-10-18 15:04:42 +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 e727233bc0 Updating unit tests for small noise being default now in KSG calculators. (The update sets noise level to 0 wherever we are checking repeated calculations, or comparing to results from other toolkits). Verifies Issue 42 fix 2015-06-16 12:30:19 +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 a028fe4a4e Adding getProperty method to debug class so it compiles 2015-06-05 14:42:06 +00:00
joseph.lizier b45ada1d94 Added unit tests for Kraskov TE auto embedding via Ragwitz criteria -- verifies Issue 38. Also adds further tests for AIS auto embedding. 2015-06-05 06:51:23 +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 8393429e26 Adding unit tests for AIS Kraskov for auto-embedding as part of partial fix for Issue 38 2015-06-04 13:59:31 +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 a6f0e2d2ed Added new unit test for KdTree to check validity of counting neighbours when one variable has been pre-checked, and different radii are used for each variable. Verifies issue 39. 2015-01-21 12:28:19 +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 33ea4f6136 Unit tests for Dynamic correlation exclusion, or Theiler window, in all Kraskov estimators, plus direct validation against values from using Theiler window in TRENTOOL. Validates issue 35 2014-11-25 12:34:49 +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 ab1d0e0c94 Minor debug print change to unit test 2014-11-14 10:30:46 +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 7ee34fd8a1 Minor new debug prints in unit tests 2014-11-04 00:57:55 +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 12faf78200 New unit tests for new methods in 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. 2014-11-03 04:58:14 +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 758d9dc0c9 Unit test for inlining norms in Nearest Neighbour search classes, and adding methods to return Collections of points within ranges 2014-10-31 12:04:12 +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 390e1cc6be Adding more debug prints to TE unit test 2014-10-30 04:40:13 +00:00
joseph.lizier 769bf1a15d Unit tests for Kraskov predictive information calculator. Also defines an abstract PI tester. 2014-10-30 04:27:46 +00:00
joseph.lizier 9aa0e9ca0e Unit tests for Kraskov multi-info calculators using fast neighbour search and common multi-info class. Additional mutual info unit test added also on larger data set, and unit tests for the UnivariateNearestNeighbourSearcher. 2014-10-30 04:24:42 +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 0849db5312 Additional unit test to verify issue 32 -- for neighbour search within different radii for each variable to the k-d tree class. 2014-10-15 10:42:32 +00:00
joseph.lizier 9ef43ae753 Verifies issue 32 -- adds unit test for neighbour search within different radii for each variable to the k-d tree class. This is used for fast neighbour search to Kraskov conditional MI calculators (and by implication to TE calculators). Existing unit tests for these calculators complete the verification. 2014-10-15 10:39:11 +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 58c812db4e Validation of bug fix re issue 31 -- unit test to ensure that surrogate TE calculations are different to the real calculation 2014-10-15 05:07:14 +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 f09cc221a4 Verifies issue 31 -- adding unit tests for KdTree structure (in conjunction with existing unit tests for the results of MI calculations) 2014-10-15 04:49:40 +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 78852bcf2a Validates issue 29 with unit tests for multi-threading of Kraskov conditional MI calculators. Also adds more substantial unit tests for Kraskov transfer entropy compared to TRENTOOL results. 2014-09-16 01:41:36 +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 0505641479 Unit tests which Validates issue 28 with unit tests for multithreading on Kraskov MI calculators. 2014-09-12 12:16:43 +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 14645d0621 Appending suffix "Discrete" to all discrete calculators. Step 4 -- refactoring within unit tests 2014-08-14 03:31:58 +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
joseph.lizier bc40fb4125 Kraskov estimators switched to use 4 nearest neighbours by default (as recommended by Kraskov et al.) 2014-08-13 02:41:25 +00:00
joseph.lizier 77680c04ad Javadocs made release-ready in the continuous.symbolic package. 2014-08-13 02:37:02 +00:00
joseph.lizier 786784e83c Javadocs made release-ready in the continuous.kraskov package. 2014-08-13 02:36:09 +00:00
joseph.lizier df196f115d Javadocs made release-ready in the continuous.kozachenko package. 2014-08-13 02:31:24 +00:00
joseph.lizier 4e676a1122 Javadocs made release-ready in the continuous.kernel package. Also renamed any "epsilon" variables to "kernelWidth" in most classes. 2014-08-13 02:30:39 +00:00
joseph.lizier fb4d6c423c Javadocs made release-ready in the continuous.gaussian package. 2014-08-13 02:24:02 +00:00
joseph.lizier edbe595032 Javadocs made release-ready in the continuous package. Also added computeLocalUsingPreviousObservations into ChannelCalculator and ChannelCalculatorMultiVariate (removed from MutualInfoMultivarate), and made the ViaCondMutualInfo classes not be abstract anymore, and moved embedding properties up into the main TransferEntropyCalculator interface 2014-08-13 02:18:33 +00:00