Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .AGENTS/memory/Optimizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -978,3 +978,12 @@ in TreeDist — every sort is `std::sort` / `std::stable_sort`.
of those end below the cutoff (candidate rejected); the row bound exits
~2%, a column-max bound would add ~1%. Further gains need a tighter
MCI upper bound or LAP warm starts between candidates.

## Rogue SPR: parent dual prices (PR #215, 2026-10-14)
Full write-up: `dev/rogue_mci_bound_findings.md`. Parent column duals bound
82–88% of wasted LAPs; remaining LAPs warm-start (2–4×). −51% at 80 tips,
−65% at 150. Size-profile / compatibility bounds ~100× too loose; progressive
row-filling skips ≤1.5% of fill. Next lever: build child cost matrices
incrementally from the parent (97.6% of candidates drop one leaf); the fill is
now 37–55% of runtime. Parent prices are computed lazily (first candidate
past the row bound).
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: TreeDist
Title: Calculate and Map Distances Between Phylogenetic Trees
Version: 2.15.0.9006
Version: 2.15.0.9007
Authors@R: c(person("Martin R.", "Smith",
email = "martin.smith@durham.ac.uk",
role = c("aut", "cre", "cph", "prg"),
Expand Down
7 changes: 6 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TreeDist 2.15.0.9006 (development)
# TreeDist 2.15.0.9007 (development)

## Bug fixes

Expand All @@ -8,6 +8,11 @@

## Performance

- `SPRDist(method = "Rogue")` bounds each candidate's clustering information
with the optimal dual prices of the parent pair, skipping most assignment
problems and warm-starting the rest: c. 50% faster at 80 leaves and 65% at
150 leaves on unrelated trees.

- Improve performance when comparing many similar trees with
`ClusteringInfoDistance()`, `MatchingSplitDistance()`, `InfoRobinsonFoulds()`
and `JaccardRobinsonFoulds()`.
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ms609/TreeDist/",
"issueTracker": "https://github.com/ms609/TreeDist/issues/",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "2.15.0.9006",
"version": "2.15.0.9007",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -571,7 +571,7 @@
"email": "martin.smith@durham.ac.uk"
}
],
"name": "TreeDist: Distances between Phylogenetic Trees. R package version 2.15.0.9006",
"name": "TreeDist: Distances between Phylogenetic Trees. R package version 2.15.0.9007",
"identifier": "10.32614/CRAN.package.TreeDist",
"@id": "https://doi.org/10.32614/CRAN.package.TreeDist",
"sameAs": "https://doi.org/10.32614/CRAN.package.TreeDist",
Expand Down
10 changes: 10 additions & 0 deletions dev/rogue_bound/add_mid.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
suppressMessages(library(TreeTools, lib.loc = "/root/Rlib"))
src <- readLines("make_workload.R")
end <- grep("^set.seed", src)[1] - 1
eval(parse(text = src[1:end]))
wl <- readRDS("workloads.rds")
set.seed(777)
wl$mid80 <- lapply(1:12, function(i) NearPair(80, 15))
wl$mid150 <- lapply(1:6, function(i) NearPair(150, 30))
saveRDS(wl, "workloads.rds")
cat(names(wl), "\n")
17 changes: 17 additions & 0 deletions dev/rogue_bound/alt_summary.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
dir <- "/tmp/claude-0/-home-claude/37427f5a-6383-50c4-a6e2-4664447d3c94/scratchpad/bound/csv2"
out <- NULL
for (f in c("rand30", "rand30d2", "rand80", "rand150", "near80", "near150")) {
x <- read.csv(file.path(dir, paste0(f, ".csv")))
lapCalls <- x$ub_row >= x$min_score
w <- x[lapCalls & x$lap_exact < x$min_score, ]
Rej <- function(b) { v <- w[[b]]; v[is.na(v)] <- Inf; 100 * mean(v < w$min_score) }
out <- rbind(out, data.frame(
wl = f, n_wasted = nrow(w),
cr = Rej("ub_cr"), rc = Rej("ub_rc"), best_cr_rc = Rej("ub_alt1"),
alt3 = Rej("ub_alt3"), alt10 = Rej("ub_alt10"),
pv = Rej("ub_pv_minv"), pv_max = Rej("ub_pv_maxv"), pv_mean = Rej("ub_pv_mean"),
pu = Rej("ub_pu"), pv1 = Rej("ub_pv_alt1"), pv3 = Rej("ub_pv_alt3"),
pvarr = Rej("ub_pv_warmarr"), prev = Rej("ub_prev"),
arr = Rej("ub_arr"), rt = Rej("ub_rt")))
}
print(format(out, digits = 3), row.names = FALSE)
Binary file added dev/rogue_bound/ana/ana
Binary file not shown.
Loading
Loading