Repository navigation
docs: add a notebooks section and split the demo notebook - #222
Merged
Merged
Conversation
…mbing HillClimbing called the deprecated `reorder_v`, so every fit emitted a FutureWarning. Call `queue_shuffle` directly and remap the labels, as GradME already does. Results are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recent jax versions only accept a boolean `where` in jax.nn.softmax, so GradME.fit failed at the end of optimisation with "jnp.max: where must be None or a boolean array" (seen with jax 0.12). Older versions treated the float mask as truthy, so results are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move demo.ipynb and demo_opt.ipynb unchanged (as getting-started.ipynb and optimisation.ipynb), so that git records the renames. Their content and the paths they use are updated in the next commit. - List them under a "Notebooks" caption in _toc.yml - Point README.md and installation.md to the new optimisation page - Only ignore the root-level experimental notebooks/ folder, so that docs/notebooks/ is tracked Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd statistics getting-started.ipynb keeps the sampling, Newick, matrix, other formats and I/O sections of the former demo, plus the built-in datasets. Tree operations and statistics move to their own notebooks, which also cover functions the demo did not: reroot, queue_shuffle, remove_branch_lengths, cov, precision, incidence and the balance indices. Also: - Fix the get_pairs description (pairs, not triplets) and a cell that printed the wrong variable; drop the os.chdir and private core calls - optimisation.ipynb: fix list_models -> list_methods, the argmax wording and the GradME score description; download the data to a temporary directory instead of the package folder; re-run with the HillClimbing and GradME fixes (no more FutureWarning or local paths) - Re-run all notebooks so that every cell has up-to-date outputs - CI: execute getting-started, tree-operations and statistics (optimisation needs the [opt] extras, RAxML-NG and R) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Moves the notebooks into a
docs/notebooks/section and splits the single demo notebook by topic. Related to #170.The "Notebooks" section of the docs now contains:
demo_opt.ipynbA core concepts notebook (how the vector encodes a tree) is planned as a follow-up, between getting started and tree operations.
Notebook changes
demo.ipynbis kept, and the notebooks now also coverreroot,queue_shuffle,remove_branch_lengths,cov,precision,incidence, the balance indices (with a link to Khurana et al. 2024) andload_alignmentget_pairsdescription (it returns pairs, not triplets), a cell that printed the wrong variable,list_models→list_methods, the "column-wise" argmax (it is row-wise), and the GradME score descriptionos.chdirintopy-phylo2vecor call the private_phylo2vec_core; the optimisation notebook downloads its data to a temporary directory instead of the package folderFutureWarningand a local path in its outputCode fixes found while re-running the optimisation notebook
HillClimbingused the deprecatedreorder_v; it now callsqueue_shuffledirectly (results are identical, checked on 1,000 random trees)GradME.fitcrashed at the end with recent jax (0.12), which requires a booleanwheremask injax.nn.softmaxOther changes
.gitignore: the experimentalnotebooks/rule is anchored to the root, as it also ignoreddocs/notebooks/[opt]extras, RAxML-NG and RREADME.mdandinstallation.mdpoint to the new optimisation pageThe notebooks are moved unchanged in a separate commit, so that git records the renames. Merging with a merge commit rather than squashing keeps that history (
git log --follow) for both notebooks.