Skip to contents

Evaluate the prevalence of a given model

Usage

getFeaturePrevalence(features, X, y = NULL, prop = TRUE, zero.value = 0)

Arguments

features:

a list of features or features indexes for which we wish to compute prevalence

X:

dataset where to compute the prevalence

y:

if provided it will also compute hte prevalence per each class (default:NULL)

prop:

weather to compute the prevalence in number or as a proportion (default:TRUE)

zero.value:

the value that specifies what is zero. This can be a different than 0 in log transformed data for instance (default = 0)

Value

A list containing the prevalence in the whole dataset as well as classes (if provided)