Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/vectorizer/src/feature/conversion/text/sparse/mod.ts>TfIdfTransformer

Feature Extraction and Feature Selection in TypeScript
Go to Latest
class TfIdfTransformer
import { TfIdfTransformer } from "https://deno.land/x/vectorizer@v0.3.7/src/feature/conversion/text/sparse/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: Matrix<T>): Matrix<T>

Transform an tf features into tf-idf features.