@types/bayes-classifier
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Installation

npm install --save @types/bayes-classifier

Summary

This package contains type definitions for bayes-classifier (https://github.com/miguelmota/bayes-classifier).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bayes-classifier.

index.d.ts

interface Classifications {
    label: string;
    value: number;
}

declare class BayesClassifier {
    constructor();

    addDocument(doc: string, label: string): void;

    addDocuments(docs: string[], label: string): void;

    classify(doc: string): string;

    getClassifications(doc: string): Classifications;

    restore(classifier: any): void;

    train(): void;
}

export = BayesClassifier;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Jason Harrison.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/bayes-classifier

Weekly Downloads

10

Version

0.0.2

License

MIT

Unpacked Size

3.43 kB

Total Files

5

Last publish

Collaborators

  • types