stats/feature_encoding_utils library

Feature scaling/encoding (bucketization, one-hot) — roadmap #589.

Functions

bucketize(num value, List<num> edges) int
Bucketize numeric value into bin index for edges (sorted boundaries).
oneHot(Object? value, List<Object?> categories) List<int>
One-hot: value in categories -> list of 0/1 of length categories.