ENH: Add ability to choose integration method [Issue43] #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Referencing (#43).
I've added a radio-button option in the Advanced Options section of PkModeling to pick an integration method from one of two choices: Recursive and Convolutional.
Convolutional was PkModeling's previous method. This method did not get perfect performance on the Duke QIBA v6 Tofts Model phantom (see https://sites.duke.edu/dblab/qibacontent/), although it got close.
Recursive is the new method. It gets perfect performance on the new phantom, and is leagues faster than the other integration method. Performance on the v9 noisy phantom is about equal between the two, so the primary benefits on actual real-life data may come from the speed bonus. My theory for why it is faster is that the Convolutional method is either O(n log n) or O(n^2) at each iteration where n is the length of the time series analyzed, whereas the Recursive method is O(n). I haven't actually worked out the math on this one though, so I could be wrong. Experimentally, the recursive method is ~1000x faster on the 1300 frame v6 phantom, and about 1.5-2x as fast on a 64-timepoint normal MRI.
@kalpathy had once mentioned that PkModeling might have been slower on Windows than it was on Mac/Linux, and I haven't yet been able to test the Convolution method on Max/Linux. At least, however, this new integration method is a very fast solution for Windows users.