get_summary_metrics: Tabulate the best lambda index

View source: R/functions.R

get_summary_metricsR Documentation

Tabulate the best lambda index

Description

For the path to a multiSnpnet results directory (saved from a multiSnpnet run with a validation set), identify the last "previous" iteration, identify the best lambda based on the validation set AUC, and load the lambda sequence stored in the RData file and return the lambda sequence. This is useful for performing a "refit" using a combined set of training + validation set.

Usage

get_summary_metrics(
  multiSnpnetResults,
  metrics = c("metric_train", "metric_val", "AUC_train", "AUC_val"),
  lambda_idx = NULL
)

Arguments

multiSnpnetResults

a list containing the results of the multiSnpnet fit

metrics

a list of metrics to include

lambda_idx

The lambda index. If not specified, we call find_best_lambda_index()

Value

A data frame of one row containing the lambda index (best and last), number of non-zero variables in the model, and the performance metrics at the best lambda index


junyangq/multiSnpnet documentation built on Oct. 19, 2023, 8:22 p.m.