oneHot function
One-hot: value in categories -> list of 0/1 of length categories.
Audited: 2026-06-12 11:26 EDT
Implementation
List<int> oneHot(Object? value, List<Object?> categories) =>
categories.map((Object? c) => c == value ? 1 : 0).toList();