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

x/netsaur/packages/utilities/src/transformer/tfidf.ts>TfIdfTransformer

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

Convert tf features (Count) into tf-idf features.

Constructors

new
TfIdfTransformer(unnamed 0?: { idf?: Float32Array; })

Properties

idf: null | Float32Array

Methods

fit<T extends DataType>(data: Matrix<T>): TfIdfTransformer

Get idf matrix from tf features.

transform<T extends DataType>(data: MatrixLike<T>): Matrix<T>

Transform an tf features into tf-idf features. Mutates the input.