Skip to contents

Adds the log odds ratio of the two base rates to the log odds, so scores of a model trained on a balanced sample (prevalence 0.5) map to the natural incidence.

Usage

adjust_for_prevalence(p, train_prevalence, target_prevalence)

Arguments

p

probabilities

train_prevalence, target_prevalence

base rates in (0, 1).