print_model_summary_pro: Print Prognostic Model Summary

View source: R/prognosis.R

print_model_summary_proR Documentation

Description

Prints a formatted summary of the evaluation metrics for a prognostic model, either from training data or new data evaluation.

Usage

print_model_summary_pro(model_name, results_list, on_new_data = FALSE)

Arguments

model_name

A character string, the name of the model (e.g., "lasso_pro").

results_list

A list containing model evaluation results, typically an element from the output of run_models_pro() or the result of bagging_pro(), stacking_pro(). It must contain evaluation_metrics and model_object (if applicable).

on_new_data

Logical, indicating whether the results are from applying the model to new, unseen data (TRUE) or from the training/internal validation data (FALSE).

Value

NULL. Prints the summary to the console.

Examples


if (requireNamespace("E2E", quietly = TRUE) &&
 "train_pro" %in% utils::data(package = "E2E")$results[,3]) {
  data(train_pro, package = "E2E")
  initialize_modeling_system_pro()
  results <- models_pro(data = train_pro, model = "lasso_pro")

  # Print summary for the trained model
  print_model_summary_pro("lasso_pro", results$lasso_pro, on_new_data = FALSE)

  # Example for a failed model
  failed_results <- list(evaluation_metrics = list(error = "Training failed"))
  print_model_summary_pro("MyFailedModel", failed_results)
}


E2E documentation built on Aug. 27, 2025, 1:09 a.m.