Learn R Programming

PatientLevelPrediction (version 6.6.0)

computeGridPerformance: Computes grid performance for a hyperparameter combination (backwards compatible)

Description

Computes grid performance for a hyperparameter combination (backwards compatible)

Usage

computeGridPerformance(prediction, param, performanceFunct = "computeAuc")

Value

A list with overall and per-fold performance plus the parameter summary.

Arguments

prediction

A data.frame with predictions and an index column for folds.

param

A list of hyperparameters (values may include NULL).

performanceFunct

String or function to compute performance on a prediction data.frame. Default is PatientLevelPrediction::computeAuc.

Examples

Run this code
prediction <- data.frame(
  rowId = c(1, 2, 3, 4, 5),
  outcomeCount = c(0, 1, 0, 1, 0),
  value = c(0.1, 0.9, 0.2, 0.8, 0.3),
  index = c(1, 1, 1, 1, 1)
)
param <- list(hyperParam1 = 5, hyperParam2 = 100)
computeGridPerformance(prediction, param, performanceFunct = PatientLevelPrediction::computeAuc)

Run the code above in your browser using DataLab