prob_to_binary: simple function to convert probability to binary classes
Description
simple function to convert probability to binary classes
Usage
prob_to_binary(x, thresh, class_levels)
Value
a vector of binary values
Arguments
- x
a vector of probabilities
- thresh
the threshold to convert to binary
- class_levels
the binary levels