@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 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
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "iyulab"
6
6
  ],
7
7
  "description": "Statistical analysis and data profiling engine with C FFI bindings.",
8
- "version": "0.12.2",
8
+ "version": "0.13.0",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/u_insight_bg.wasm CHANGED
Binary file