@iyulab/u-insight 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/node/u_insight_bg.wasm +0 -0
- package/package.json +1 -1
- package/u_insight_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -334,7 +334,18 @@ DBSCAN density-based clustering. `config`: `{ "epsilon": 1.5, "min_samples": 3 }
|
|
|
334
334
|
|
|
335
335
|
#### `hierarchical(data, config) -> HierarchicalResult`
|
|
336
336
|
|
|
337
|
-
Hierarchical agglomerative clustering. `config`: `{ "linkage": "ward", "n_clusters": 3 }` or `{ "linkage": "single", "distance_threshold": 5.0 }`.
|
|
337
|
+
Hierarchical agglomerative clustering (nearest-neighbor-chain, **O(n²)** time / O(n²) memory). `config`: `{ "linkage": "ward", "n_clusters": 3 }` or `{ "linkage": "single", "distance_threshold": 5.0 }`.
|
|
338
|
+
|
|
339
|
+
**Config fields:**
|
|
340
|
+
- `linkage` — `"single" | "complete" | "average" | "ward"` (default `"ward"`).
|
|
341
|
+
- `n_clusters` — flat clusters to extract (mutually exclusive with `distance_threshold`).
|
|
342
|
+
- `distance_threshold` — dendrogram cut height (mutually exclusive with `n_clusters`).
|
|
343
|
+
- `max_points` — memory guard; inputs with more points are rejected before allocating the O(n²) distance matrix. Omit for the default (`10000`, ≈400 MB matrix); set `0` to disable. Raise it for large native batches; lower it for tight memory (e.g. a browser tab).
|
|
344
|
+
|
|
345
|
+
```js
|
|
346
|
+
// large dataset on a memory-constrained page: cap it explicitly
|
|
347
|
+
hierarchical(data, { linkage: "ward", n_clusters: 3, max_points: 5000 });
|
|
348
|
+
```
|
|
338
349
|
|
|
339
350
|
**Output:**
|
|
340
351
|
```json
|
package/node/u_insight_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/u_insight_bg.wasm
CHANGED
|
Binary file
|