healthcareai (version 2.3.0)

get_cutoffs: Get cutoff values for group predictions

Description

Get cutoff values for group predictions

Usage

get_cutoffs(x)

Arguments

x

Data frame from predict.model_list where outcome_groups or risk_groups was specified

Value

A message is printed about the thresholds. If outcome_groups were defined the return value is a single numeric value, the threshold used to separate predicted probabilities into outcome groups. If risk_groups were defined the return value is a data frame with one column giving the group names and another column giving the minimum predicted probability for an observation to be in that group.

Examples

Run this code
# NOT RUN {
machine_learn(pima_diabetes[1:20, ], patient_id, outcome = diabetes,
              models = "xgb", tune = FALSE) %>%
  predict(risk_groups = 5) %>%
  get_cutoffs()
# }

Run the code above in your browser using DataLab