omdsh-dev/dsh-tool-stat

DSH statistical tool plug-in: descriptive statistics/percentile/frequency distribution/correlation, zero-dependence pure function determinism

dsh-tool-stat registers the stat tool (@deepseek-ai/dsh-tool-stat, row id tool-stat) for DeepSeek Harness: descriptive statistics, percentiles, frequency distributions, and correlation computation over an explicitly passed finite numeric array — a single function call returns a structured JSON report in milliseconds. Actions: describe (count/sum/min/max/mean/median/variance/standardDeviation/q1/q3/iqr, population or sample), percentile (linear interpolation, 0..100, order preserved), frequency (value/count/ratio groups, ascending), correlation (Pearson or Spearman; zero variance returns defined:false + reason instead of NaN). Same input always yields the same output.

Other ★ 6 updated 2026-09-10 ✅ runtime-tested
View on GitHub ↗

Install

dsh plugin --profile web add github:omdsh-dev/dsh-tool-stat

GitHub bundle install per README (DSH 0.1.0-rc.8 (npm) profile-bundle): dsh plugin --profile web add github:omdsh-dev/dsh-tool-stat (web profile), or dsh plugin --profile headless add github:omdsh-dev/dsh-tool-stat for one-off headless tasks. Tarball alternative: npm pack, then dsh plugin --profile web add ./dsh-tool-stat-<version>.tgz. Verify: dsh --profile web --dump-config | grep tool-stat. The bundled dsh.bundle.patch automatically adds the plugin to the profile's layer stack (row id tool-stat).

Compatibility

DeepSeek Harness 0.1.0-rc.8 (npm), any profile. Zero-dependency, pure-function, deterministic statistics tool: Neumaier compensated summation, Welford online variance, linear-interpolation percentiles, Spearman midrank — all hand-written. Strict finite-number constraint (rejects NaN/Infinity with index-locating errors; -0 normalized), overflow re-check on all results, no input mutation. Budgets: 1..100,000 observations, ≤100 percentile requests, ≤10,000 distinct outputs (truncated by deterministic rules and flagged), timeoutMs 2000. Reads no files, no network, no processes, no state.

Details

Recent updates

The current English README (README.en.md) documents: motivation (calculator is single-expression; dsh-tool-csv stats is structural; mental math is unverifiable), the security model, the tool declaration with actions/parameters, output examples, and installation (profile bundle, tarball, verify, runtime verification, legacy monorepo scenario).

FAQ

Why not use bash or calculator for stats?
The calculator tool only does single-expression evaluation — one expression cannot compute quantile distributions or a correlation coefficient — and bash arithmetic spawns a process per operation and lacks math functions. This plugin returns a deterministic structured JSON report in milliseconds.
What happens with NaN or Infinity in the input?
They are rejected with an index-locating error (e.g. values[3] must be a finite number (got Infinity)); -0 is normalized to 0 in both input and output, and all results are re-checked for finiteness before being returned.
How is correlation handled with zero variance?
correlation on a zero-variance pair returns defined: false with reason 'zero-variance' instead of NaN or ±Infinity.

Alternatives

omdsh-dev/dsh-tool-calculator · biociao/dsh-science · ccch1mneyyy/dsh-cc-tui

More plugins in Other

Browse more in Other

Guides for Other plugins