1.0.16 • Published 5 months ago

hdbscan-ts v1.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

hdbscan-ts

A TypeScript implementation of HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise), based on Campello et al. 2017.

HDBSCAN is particularly effective at:

  • Detecting clusters of varying densities
  • Identifying noise points
  • Handling clusters of different shapes
  • Providing cluster membership probabilities

Installation

npm install hdbscan-ts

Usage

import { HDBSCAN } from "hdbscan-ts";
const data = [
  [1.1, 2.1],
  [2.1, 1.1],
  [1.1, 1.1],
  [0.1, 1.1],
  [10.1, 11.1],
  [11.1, 10.1],
  [10.1, 10.1]
];
const hdbscan = new HDBSCAN({
  minClusterSize: 2
});
const labels = hdbscan.fit(data);
console.log(labels);
// [0, 0, 0, 0, 1, 1, 1]

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

1.0.16

5 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago