Skip to content

HVTI Recipes 3.1.6

Choose a tag to compare

@ehrlinger ehrlinger released this 06 Oct 19:57
aa48a90

A patch edition with one correction you should know about, a new recipe on numbering figures and tables, and figures that now come out the same however and wherever the book is built.

Read it: https://ehrlinger.github.io/hvtiGraphics/

A correction first

The varPro chapter's "recurrence" figure showed the wrong class (#86). On a two-level outcome, varPro::ivarpro() explains the first level, here N (no recurrence), and ggRandomForests filed that profile under the last level, R. So the figure captioned as recurrence showed positive lymph nodes lowering the probability of recurrence, which is the no-recurrence profile with its sign reversed. ggRandomForests now derives the recurrence profile exactly (ehrlinger/ggRandomForests#316), and the figure shows what its caption says: the forest's recurrence probability rises with node count. If you copied that figure or its reading into anything, recheck it. The chapter also explains which_class properly now, and the class-conditional plot labels its panels N and R instead of varPro's internal 0 and 1 (ehrlinger/ggRandomForests#315).

3.1.6

  • A new recipe, "Numbering figures and tables" (#83), in the publications part. Quarto numbers a figure only when it has a fig- label and a fig-cap, and a table only with a tbl- label and tbl-cap; the recipe covers that, computed captions, and the other ways a figure quietly loses its number.
  • The house percentile box (#80). boxplots.qmd documents the box ggRandomForests::gg_varpro() draws, with hinges at the 15th and 85th percentiles, whiskers at the 5th and 95th and no outlier points, beside the Tukey box it is easy to mistake it for. Ten chapters move to the house colour rule: the Okabe-Ito palette for groups in place of Set1 and Dark2, and RdBu in place of RdYlGn for ordered scales.
  • The Sankey chapter teaches the new default palette (#85): Paul Tol's muted nine from hvtiPlotR 2.8.5, which hold up for red-green colour-blind readers, and the partial node_colours override.
  • Random-forest output is reproducible (#81, #82). A forest grown on several threads does not honour set.seed(), so the same seeded fit gave a different answer on every run of the book's CI build. Every forest now grows on one thread. Two chapters had blamed that drift on the change of platform; they now name the real cause and show options(rf.cores = 1) as the fix in your own analyses.
  • Figures carry their exact colours (#84, #87). Built on a Mac, every HTML figure's colours had been shifted darker (the PDF's never were): "firebrick" came out #A0111A instead of #B22222. HTML figures are now drawn with ragg, which writes the exact values on every platform, and the whole HTML cache comes from one clean CI build against the versions recorded below. You will see slightly lighter, truer colours throughout.

Built against

hvtiR 1.2.5, hvtiPlotR 2.8.5, hvtiRutilities 1.4.4, hvtiRtables 1.0.3, TemporalHazard 1.2.12 and ggRandomForests 4.0.0 (c2e494d), with randomForestSRC 3.9.0, varPro 3.3.0 and mlbench 2.1-11. sibling-versions.json records them. The PDF is built locally and its figures are unchanged where its chapters were not re-rendered.