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

x/netsaur/packages/utilities/mod.ts>TfEncoder

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

Convert 2D array of indices into multi-hot encoded vectors where each index contains the number of times the respective value appears in a sample (term frequency encoder).

Constructors

new
TfEncoder(mappingSize: number)

Properties

mappingSize: number

Size of encoded vectors.

Methods

transform<DT extends DataType>(targets: Matrix<DT>): Matrix<DT>

Encoding values into count vectors

transform<DT extends DataType>(targets: number[][], dType: DT): Matrix<DT>