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

x/netsaur/packages/utilities/src/text/mod.ts>TfIdfTransformer

Powerful machine learning, accelerated by WebGPU
Go to Latest
class TfIdfTransformer
import { TfIdfTransformer } from "https://deno.land/x/netsaur@0.4.0-patch/packages/utilities/src/text/mod.ts";

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

Constructors

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

Properties

idf: null | Float64Array

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.