(transform-one-hot column-selector strategy)
(transform-one-hot column-selector strategy options)
Transformer which mapps categorical variables to numbers. Each value of the column gets its won column in one-hot-encoding.
To handle different levls of a variable between train an test data, three strategies are available:
:full
The levels are retrieved from a dataset at key :metamorph.ml/full-ds in the context:independent
One-hot columns are fitted and transformed independently for train and test data:fit
The mapping fitted in mode :fit is used in :transform, and it is assumed that all levels are present in the data during :fitoptions
can be:
:table-args
allows to specify the precise mapping as a sequence of pairs of [val idx] or as a sorted seq of values.:result-datatype
Datatype of the one-hot-mapping columnTransformer which mapps categorical variables to numbers. Each value of the column gets its won column in one-hot-encoding. To handle different levls of a variable between train an test data, three strategies are available: * `:full` The levels are retrieved from a dataset at key :metamorph.ml/full-ds in the context * `:independent` One-hot columns are fitted and transformed independently for train and test data * `:fit` The mapping fitted in mode :fit is used in :transform, and it is assumed that all levels are present in the data during :fit `options` can be: * `:table-args` allows to specify the precise mapping as a sequence of pairs of [val idx] or as a sorted seq of values. * `:result-datatype` Datatype of the one-hot-mapping column
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close