Commit Graph

237 Commits

Author SHA1 Message Date
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
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 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 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 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