Dealing with categorical dataset data involves having two mapping systems. The first is a map of category to integer within the same column. The second is a 'one-hot' encoding where you generate more columns but those have a reduced number of possible categories, usually one categorical value per column.
Dealing with categorical dataset data involves having two mapping systems. The first is a map of category to integer within the same column. The second is a 'one-hot' encoding where you generate more columns but those have a reduced number of possible categories, usually one categorical value per column.
(build-categorical-map dataset column-name-seq & [table-value-list])
Given a dataset and these columns, produce a label-map of column-name to specific categorical label-map.
Given a dataset and these columns, produce a label-map of column-name to specific categorical label-map.
(column-categorical-map categorical-map new-dtype old-column)
Given a categorical map for a given column, produce a new column of the desired datatype with the values mapped to the table values.
Given a categorical map for a given column, produce a new column of the desired datatype with the values mapped to the table values.
(column-one-hot-map one-hot-map new-dtype dataset column-name)
Using one hot map, produce Y new columns while removing existing column.
Using one hot map, produce Y new columns while removing existing column.
(column-values->categorical dataset src-column categorical-map)
Given a column encoded via either string->number or one-hot, reverse map to the a sequence of the original string column values.
Given a column encoded via either string->number or one-hot, reverse map to the a sequence of the original string column values.
(inverse-map-categorical-col-fn src-column column-categorical-map)
(inverse-map-categorical-columns dataset src-column column-categorical-map)
(make-string-table-from-table-args table-value-list)
Make a mapping of value->index from a list of either string values or [valname idx] pairs. Returns map of value->index.
Make a mapping of value->index from a list of either string values or [valname idx] pairs. Returns map of value->index.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close