View source: R/create_object.R
| create_pathofmpred_object | R Documentation |
Feature and outcome tables are linked only through 'id_column'. Outcome IDs must be unique. Feature IDs may repeat, for example when a patient has more than one slide, and are pooled before model development.
create_pathofmpred_object(
feature_table,
outcome_table,
id_column,
aggregation = c("mean", "median"),
foundation_model = "custom",
feature_columns = NULL,
outcome_columns = NULL,
outcome_types = NULL,
positive_class = NULL,
control = pathofmpred_control(),
output_file = NULL
)
feature_table |
Data frame, matrix, or CSV path containing identifiers and numeric foundation-model features. |
outcome_table |
Data frame or CSV path containing one unique row per identifier and one or more outcomes. |
id_column |
Name of the identifier column present in both tables. |
aggregation |
How repeated feature rows are pooled: 'mean' or 'median'. |
foundation_model |
Label stored in the resulting object. |
feature_columns |
Optional numeric feature columns. By default all columns except 'id_column' are used. |
outcome_columns |
Optional outcomes to fit. By default all columns except 'id_column' are considered. |
outcome_types |
Optional named character vector containing 'continuous' or 'binary'. Otherwise numeric two-level outcomes are binary and other numeric outcomes are continuous. |
positive_class |
Event-class label for binary outcomes. Supply either one value when fitting a single binary outcome or a named character vector keyed by endpoint. Zero/one and FALSE/TRUE outcomes default to one and TRUE; all other binary labels require an explicit value. |
control |
Settings created by [pathofmpred_control()]. |
output_file |
Optional '.rds' destination. |
A 'PathoFMPredObject' containing fitted models, a registry, nested-CV summaries, and a linkage/missingness audit.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.