Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Migrates nested-sampling from BEAST2 (2.7.x) / Ant to BEAST3 (2.8.0-beta7) / Maven. Tracked in #16. It now depends on model-selection:1.7.0-beta1.
Build system: Ant → Maven
Parameter → Tensor
Same BEAST3 type-system change as in model-selection. In NS.java, NIS.java, and NSOperatorSchedule.java, instanceof Parameter checks and Parameter.getDimension() calls became instanceof Tensor / Tensor.size() — StateNode dimension-counting logic is otherwise unchanged.
Commons Math → Commons Statistics / Commons Math 4
Two distinct replacements were needed, since BEAST3 dropped org.apache.commons.math entirely:
JUnit 4 → 5
All test classes use org.junit.jupiter.api.Test/Assertions; pom.xml adds junit-jupiter as a test dependency.
Test infrastructure duplicated to make the build compile
BEASTTestCase, XMLPathUtil, and ExampleXmlParsingTest (under src/test/java/test/beast/) were copied into this project's own test
sources rather than reused from beast-base, because s aren't published as a reusable test-jar artifact in the new modular Maven setup — duplicating them was the only way to get mvn test to compile.
YuleModelNormalised: moved main to a proper unit test
The original class had a public static void main(...) used only for manual smoke-testing, which pulled in a dependency on
BEASTTestCase inside the main sources. That method woved to a newYuleModelNormalisedTest.testYuleModelNormalised(). Since there was no previously-recorded expected value to migrate, the expected
logP (-10.018014963613476) was generated by running ST3 code itself — the test comment notes thisexplicitly ("computed from beast3 code on July 2026"), so it's a regression-guard baseline rather than an independently verified
value.
NS_4taxa_NormalBirthRate.xml: init issue, expected value diverges
Running the migrated XML under BEAST3 threw an initialization error from the RandomTree, fixed by adding rootHeight="0.19" to force a valid starting height. However, this changes the initial state enough that the nested-sampling evidence estimate Z no longer matches the original BEAST2 expected value:
Maven release beta1 is https://central.sonatype.com/artifact/io.github.beast2-dev/nested-sampling
TODO:
Could not find class beast.base.core.BEASTInterface as service when loading BEAUti template #17