JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1790
  • Score
    100M100P100Q111439F
  • License MIT

TypeScript implementation of HDBSCAN clustering algorithm

Package Exports

  • hdbscan-ts
  • hdbscan-ts/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hdbscan-ts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hdbscan-ts

A TypeScript implementation of the HDBSCAN clustering algorithm.

Installation

npm install hdbscan-ts

Usage

import { HDBSCAN } from "hdbscan-ts";
const data = [
  [1, 2],
  [2, 3],
  [100, 100]
  // ... more points
];
const hdbscan = new HDBSCAN({
  minClusterSize: 3,
  minSamples: 2
});
const labels = hdbscan.fit(data);
console.log(labels);

API

HDBSCAN

Constructor Options

  • minClusterSize (default: 5): Minimum size of clusters
  • minSamples (default: 5): Minimum number of samples in neighborhood
  • debugMode (default: false): Enable debug logging

Methods

  • fit(data: number[][]): HDBSCAN
  • labels_: number[]
  • probabilities_: number[]

License

MIT