Discrete null fitting algorithm (updates to PR #175) #179
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.
This PR updates the discrete null fitting algorithm implemented in PR #175, integrates it into the code base, and tests it against$J < 150$ , and otherwise the symmetric algorithm is used (the argument $J = 150$ is heuristic, determined by comparing runtimes and log likelihoods between these approaches across a range of $n$ , $J$ , and $p$ in two real datasets. While the discrete approach typically achieves a higher log likelihood (often not by very much, but occasionally by a lot), it becomes slow than the symmetric approach between $J = 100$ and $J = 200$ , and quite a bit slower for $J > 500$ .
fit_null_symmetric(). By default, this discrete null fitting algorithm is used automatically for discrete designs whennull_fit_algcan be used to override these defaults). ThisThis is a subset of runtime results from tests that are skipped or commented out in "test-null_fit_discrete":
One additional note - I also experimented with increasing the discrete root mean score norm tolerance, but this did not decrease runtime very much, especially for large$J$ .