Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netsaur/packages/utilities/src/encoding/mod.ts>CategoricalEncoder

Powerful Powerful Machine Learning library with GPU, CPU and WASM backends
Latest
class CategoricalEncoder
import { CategoricalEncoder } from "https://deno.land/x/netsaur@0.4.2/packages/utilities/src/encoding/mod.ts";

Constructors

new
CategoricalEncoder(mappings?: Map<T, number>)

Properties

optional
encoder: OneHotEncoder
mapper: DiscreteMapper<T>
maxLength: number

Methods

fit(document: T[]): CategoricalEncoder<T>
getMapping<DT extends DataType>(data: DType<DT>): T | undefined
transform<DT extends DataType>(document: T[], dType: DT): Matrix<DT>
untransform<DT extends DataType>(data: MatrixLike<DT>): T[]