Skip to content

Conversation

Entejar
Copy link

@Entejar Entejar commented Sep 29, 2025

What

  • Implemented Cloglog Ordinal BART in Stochtree
  • Key additions and updates:
    • Added SuffStat and LeafModel classes for Cloglog Ordinal BART
    • Added ordinal_sampler and integrated into the sampling framework
    • Updated partition_tracker (to support auxiliary data), tree_sampler.h, and sampler.cpp
    • Added cloglog_ordinal_bart() R interface function
    • Created a vignette demonstrating use

Why

  • Extends Stochtree with support for ordinal outcomes under the cloglog link
  • Enables applications to ordinal datasets (e.g., survey responses, Likert-type scales)
  • Complements existing BART functionality by broadening the family of supported outcome types

Testing

  • Verified implementation through simulation runs
  • Tested end-to-end via cloglog_ordinal_bart()
  • Vignette included to illustrate use and confirm correctness

Notes

  • Backward compatibility: existing models and samplers remain unaffected
  • Ready for review and feedback

Thanks so much for reviewing this! Really appreciate your help and feedback as always :-)

@andrewherren
Copy link
Collaborator

Thanks for submitting a major increment for stochtree's model support! I've just ran the github actions unit tests and it seems many of them are not passing. I will start code review once the unit tests are passing. Happy to discuss this at any point!

@andrewherren
Copy link
Collaborator

A few initial comments:

  1. There seem to be many new #include statements in the C++ headers that aren't being used? For example, the only change to common.h is the inclusion of <chrono>, <functional>, <map>, and <unordered_map>. Is there a reason for this? I'd like to make sure this PR only contributes absolutely necessary code, so that it's quicker for me to review.
  2. The same is true for lines like 406 of leaf_model.h which appear to be simply adding spaces?
  3. One thing that caught my eye is the comment Implementation adapted from limma package in R, originally by Gordon Smyth in the new TrigammaInverse method. The limma package is GPL-licensed. stochtree uses the MIT license, so we can't accept code from GPL codebases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants