Skip to contents

Runs a full comparison of the BM baseline and pigauto (with attention + calibration) over multiple random seeds. Returns a tidy data.frame suitable for plotting or downstream analysis.

Usage

compare_methods(
  data,
  tree,
  splits = NULL,
  seeds = 1:3,
  epochs = 500L,
  verbose = TRUE,
  ...
)

Arguments

data

pigauto_data object.

tree

phylo object.

splits

pre-computed splits (applied to all reps) or NULL to create fresh splits per seed.

seeds

integer vector of random seeds for replication.

epochs

number of training epochs.

verbose

logical.

...

additional arguments passed to fit_pigauto.

Value

A data.frame with columns: method, trait, type, metric, value, rep.

Details

For each seed the function:

  1. Creates train/val/test splits.

  2. Fits the phylogenetic BM baseline.

  3. Fits pigauto (with attention and calibration enabled by default).

  4. Evaluates both methods on the test split.

  5. Collects results into a single data.frame.

Examples

if (FALSE) { # \dontrun{
cmp <- compare_methods(pd, tree300, seeds = 1:3, epochs = 500)
# Summarise across reps
aggregate(value ~ method + trait + metric, data = cmp, FUN = mean)
} # }