Candidate 0/1 encodings of a column, where the meaning is unambiguous
Source:R/leakage.R
mm_binary_forms.RdA predictor can only be an exact copy of a binary outcome if it carries the same two-valued information, so this answers a narrow question: can this column be read as 0/1 without guessing. Numeric columns holding only 0 and 1, logicals, and any column with exactly two observed values qualify. Everything else does not, which is what keeps an arbitrary string from being coerced into an outcome.