@iyulab/u-insight 0.10.1 → 0.12.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
@@ -361,7 +361,10 @@ Local Outlier Factor anomaly detection. `config`: `{ "k": 20, "threshold": 1.5 }
361
361
 
362
362
  #### `distribution_analysis(data, config) -> DistributionResult`
363
363
 
364
- Distribution analysis on a 1-D array. `config`: `{ "bin_method": "freedman_diaconis", "significance_level": 0.05, "compute_ecdf": true, "compute_histogram": true, "compute_qq_plot": true, "fit_distributions": false }`.
364
+ Distribution analysis on a 1-D array. `config`: `{ "bin_method": "freedman_diaconis", "bins": null, "significance_level": 0.05, "compute_ecdf": true, "compute_histogram": true, "compute_qq_plot": true, "fit_distributions": false }`.
365
+
366
+ - `bin_method`: `"sturges" | "scott" | "freedman_diaconis"` — automatic bin count rule (default `"freedman_diaconis"`).
367
+ - `bins` (optional, integer >= 1): explicit histogram bin count. When set it takes precedence over `bin_method`, and the histogram `method` field echoes `"Fixed(n)"`.
365
368
 
366
369
  **Output:**
367
370
  ```json
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.10.1",
8
+ "version": "0.12.0",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/u_insight.d.ts CHANGED
@@ -69,22 +69,6 @@ export function dbscan(data: any, config: any): any;
69
69
  */
70
70
  export function describe(data: any): any;
71
71
 
72
- /**
73
- * Univariate outlier detection on a flat numeric vector.
74
- *
75
- * # Input
76
- * ```json
77
- * { "data": [1.0, 2.0, 3.0, 100.0], "method": "iqr" }
78
- * ```
79
- * `method` ∈ `{"iqr"|"tukey", "zscore"|"three_sigma", "modified_zscore"|"hampel"}`.
80
- * Optional, defaults to `"iqr"`.
81
- *
82
- * # Output
83
- * `{ method, indices, scores, count, pct, lower_fence, upper_fence, center, spread }`
84
- *
85
- * `method` aliases: `tukey` → IQR Tukey fences (k=1.5), `three_sigma` →
86
- * mean ± 3·σ, `hampel` → robust median ± 3.5·(MAD/0.6745).
87
- */
88
72
  export function detect_univariate_outliers(data: any): any;
89
73
 
90
74
  /**
@@ -94,9 +78,13 @@ export function detect_univariate_outliers(data: any): any;
94
78
  *
95
79
  * `data`: flat array `[1.0, 2.0, 3.0, ...]`
96
80
  *
97
- * `config`: `{ "bin_method": "freedman_diaconis", "significance_level": 0.05,
98
- * "compute_ecdf": true, "compute_histogram": true, "compute_qq_plot": true,
99
- * "fit_distributions": false }`
81
+ * `config`: `{ "bin_method": "freedman_diaconis", "bins": null,
82
+ * "significance_level": 0.05, "compute_ecdf": true, "compute_histogram": true,
83
+ * "compute_qq_plot": true, "fit_distributions": false }`
84
+ *
85
+ * `bins` (optional, >= 1): explicit histogram bin count; when set it takes
86
+ * precedence over `bin_method`. The histogram `method` field echoes
87
+ * `"Fixed(n)"` in that case.
100
88
  *
101
89
  * # Output
102
90
  *
package/u_insight_bg.js CHANGED
@@ -100,20 +100,6 @@ export function describe(data) {
100
100
  }
101
101
 
102
102
  /**
103
- * Univariate outlier detection on a flat numeric vector.
104
- *
105
- * # Input
106
- * ```json
107
- * { "data": [1.0, 2.0, 3.0, 100.0], "method": "iqr" }
108
- * ```
109
- * `method` ∈ `{"iqr"|"tukey", "zscore"|"three_sigma", "modified_zscore"|"hampel"}`.
110
- * Optional, defaults to `"iqr"`.
111
- *
112
- * # Output
113
- * `{ method, indices, scores, count, pct, lower_fence, upper_fence, center, spread }`
114
- *
115
- * `method` aliases: `tukey` → IQR Tukey fences (k=1.5), `three_sigma` →
116
- * mean ± 3·σ, `hampel` → robust median ± 3.5·(MAD/0.6745).
117
103
  * @param {any} data
118
104
  * @returns {any}
119
105
  */
@@ -132,9 +118,13 @@ export function detect_univariate_outliers(data) {
132
118
  *
133
119
  * `data`: flat array `[1.0, 2.0, 3.0, ...]`
134
120
  *
135
- * `config`: `{ "bin_method": "freedman_diaconis", "significance_level": 0.05,
136
- * "compute_ecdf": true, "compute_histogram": true, "compute_qq_plot": true,
137
- * "fit_distributions": false }`
121
+ * `config`: `{ "bin_method": "freedman_diaconis", "bins": null,
122
+ * "significance_level": 0.05, "compute_ecdf": true, "compute_histogram": true,
123
+ * "compute_qq_plot": true, "fit_distributions": false }`
124
+ *
125
+ * `bins` (optional, >= 1): explicit histogram bin count; when set it takes
126
+ * precedence over `bin_method`. The histogram `method` field echoes
127
+ * `"Fixed(n)"` in that case.
138
128
  *
139
129
  * # Output
140
130
  *
@@ -381,10 +371,6 @@ export function __wbg_Error_ef53bc310eb298a0(arg0, arg1) {
381
371
  const ret = Error(getStringFromWasm0(arg0, arg1));
382
372
  return ret;
383
373
  }
384
- export function __wbg_Number_6b506e6536831eaa(arg0) {
385
- const ret = Number(arg0);
386
- return ret;
387
- }
388
374
  export function __wbg_String_8564e559799eccda(arg0, arg1) {
389
375
  const ret = String(arg1);
390
376
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -427,10 +413,6 @@ export function __wbg___wbindgen_is_object_56732c2bc353f41d(arg0) {
427
413
  const ret = typeof(val) === 'object' && val !== null;
428
414
  return ret;
429
415
  }
430
- export function __wbg___wbindgen_is_undefined_67b456be8673d3d7(arg0) {
431
- const ret = arg0 === undefined;
432
- return ret;
433
- }
434
416
  export function __wbg___wbindgen_jsval_eq_1068e624fa87f6ab(arg0, arg1) {
435
417
  const ret = arg0 === arg1;
436
418
  return ret;
@@ -480,10 +462,6 @@ export function __wbg_get_unchecked_33f6e5c9e2f2d6b2(arg0, arg1) {
480
462
  const ret = arg0[arg1 >>> 0];
481
463
  return ret;
482
464
  }
483
- export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
484
- const ret = arg0[arg1];
485
- return ret;
486
- }
487
465
  export function __wbg_instanceof_ArrayBuffer_8f49811467741499(arg0) {
488
466
  let result;
489
467
  try {
package/u_insight_bg.wasm CHANGED
Binary file