Encode a factor as a one-hot indicator matrix
Extract data classes from a data frame or matrix
Recompose a data frame into another form
Ensure that 'data' contains required column names
Ensure no duplicate terms appear in 'formula'
Ensure that the outcome has binary factors
Ensure that the outcome has only factor columns
Ensure that predictions have the correct number of rows