taxon_effect: Taxon-level leave-out contributions for split-lines

View source: R/taxon_effect.R

taxon_effectR Documentation

Taxon-level leave-out contributions for split-lines

Description

For each unique taxon label in obj$call.info$Call_ARGS$data (for example, species or genus), remove all of its occurrences from both child polygons of every split, recompute split-line performance, and record both the resulting value and its difference from the original.

Usage

taxon_effect(obj)

Arguments

obj

A hespdiv object.

Details

Let P be the split-line performance stored in obj$split.stats$performance. For a focal taxon t, we compute P^{-t} by removing all occurrences of t. We report \Delta so that \Delta > 0 always indicates a positive contributor (that is, removal worsens performance):

  • If obj$call.info$Call_ARGS$maximize = FALSE (lower is better, for example similarity), \Delta = P^{-t} - P.

  • If obj$call.info$Call_ARGS$maximize = TRUE (higher is better, for example distance), \Delta = P - P^{-t}.

If a taxon is absent from a split's parent polygons, elimination is a no-op and \Delta = NA.

Value

A list of class taxon_effect_result with:

elim.comp.vals

Performance after removing each taxon; dimension [n_splits x n_taxa].

delta

Signed contribution \Delta as defined above; dimension [n_splits x n_taxa].

n_per_pol

Counts of the focal taxon per split and polygon.

baseline

The original performance vector.

See Also

Other functions for hespdiv results post-processing: cross_comp(), hsa(), hsa_detailed(), hsa_quant(), hsa_sample_constrained(), nulltest()


hespdiv documentation built on May 21, 2026, 5:09 p.m.