predict_pathofm: Apply supported models for one pathology foundation-model...

View source: R/predict.R

predict_pathofmR Documentation

Apply supported models for one pathology foundation-model representation

Description

Multiple rows with the same 'patient_id' are interpreted as multiple slides and mean-pooled before prediction, matching model development.

Usage

predict_pathofm(
  cancer,
  features,
  foundation_model = c("TITAN", "GigaSSL", "ProvGigaPath"),
  patient_id = NULL,
  outcome_type = c("continuous", "binary"),
  family = NULL,
  warn_ood = TRUE,
  include_limited_evidence = FALSE
)

Arguments

cancer

One TCGA cancer code per row, or one code recycled to all rows.

features

A matrix or data frame containing the correctly named features for 'foundation_model'.

foundation_model

One of 'TITAN', 'GigaSSL', or 'ProvGigaPath'.

patient_id

Optional identifier per row. Repeated identifiers are pooled.

outcome_type

One or more of 'continuous' and 'binary'.

family

Optional endpoint-family filter.

warn_ood

Warn when over 5 percent of dimensions fall outside training ranges.

include_limited_evidence

Explicitly opt in to limited-sample models that still crossed the representation-specific matched effect threshold. Models tested below the threshold never enter prediction or reporting.

Value

A long data frame with one row per patient and applicable model. For atlas collections, fields prefixed 'matched_tss_' describe the representation-specific sensitivity analysis that held complete TCGA tissue-source-site codes apart. 'repeated_auc' and 'repeated_pr_auc' are missing when five-repeat validation was not performed for that model; they are never filled with a primary-screen estimate. These internal performance fields do not validate an individual prediction.


PathoFMPred documentation built on Nov. 12, 2026, 5:10 p.m.