MCPcopy Index your code
hub / github.com/simple-statistics/simple-statistics

github.com/simple-statistics/simple-statistics @v7.9.3 sqlite

repository ↗ · DeepWiki ↗ · release v7.9.3 ↗
151 symbols 427 edges 273 files 107 documented · 71%
README

Simple Statistics

A JavaScript implementation of descriptive, regression, and inference statistics.

Coverage Status npm version

Implemented in literate JavaScript with no dependencies, designed to work in all modern browsers (including IE) as well as in node.js.

Installation

  • I'm using Node.js, Webpack, Browserify, Rollup, or another module bundler, and install packages from npm.
  • First, install the simple-statistics module, using npm install simple-statistics, then include the code with require or import:
  • I use the require function to use modules in my project. (most likely)
    • When you use require, you have the freedom to assign the module to any variable name you want, but you need to specify the module's name exactly: in this case, 'simple-statistics'. The require method returns an object with all of the module's methods attached to it.
var ss = require('simple-statistics')
  • I use import to use modules in my project. I'm probably using Babel, @std/esm, Webpack, or Rollup.
    • Import all functions under the ss object:
      import * as ss from 'simple-statistics'
      Include a specific named export:
      import {min} from 'simple-statistics'
      Simple statistics has only named exports for ES6.
  • I'm using Deno.
  • We recommend using Deno's first-class NPM compatibility to use simple-statistics from NPM: you'll need to import it as npm:simple-statistics.
  • I'm not using a module bundler. I'm writing a web page, and want to include simple-statistics using a script tag.
  • I want to support all browsers
    • When you use simple-statistics from a script tag, you don't get to choose the variable name it is assigned to: simple-statistics will always become available globally as the variable ss. You can reassign this variable to another name if you want to, but doing so is optional. HTML <script src='https://unpkg.com/simple-statistics@7.9.3/dist/simple-statistics.min.js'> </script>
  • I want to use ES6 modules in a browser and I'm willing to only support new browsers to do it
    • This module works great with the ?module query parameter of unpkg. If you specify type='module' in your script tag, you'll be able to import simple-statistics directly - through index.js and with true ES6 import syntax and behavior. js <script type='module'> import {min} from "https://unpkg.com/simple-statistics@7.9.3/index.js?module" console.log(min([1, 2, 3])) </script> This feature is still experimental in unpkg and very bleeding-edge.

Extension points exported contracts — how you extend this code

DistributionTable (Interface)
(no doc)
src/chi_squared_distribution_table.d.ts

Core symbols most depended-on inside this repo

train
called by 31
src/perceptron.js
mean
called by 14
src/mean.js
predict
called by 12
src/perceptron.js
sign
called by 9
src/sign.js
score
called by 8
src/bayesian_classifier.js
uniqueCountSorted
called by 8
src/unique_count_sorted.js
quickselect
called by 7
src/quickselect.js
numericSort
called by 6
src/numeric_sort.js

Shape

Function 136
Class 8
Method 6
Interface 1

Languages

TypeScript100%

Modules by API surface

src/quantile.js6 symbols
src/silhouette.js5 symbols
src/perceptron.js5 symbols
src/bayesian_classifier.js5 symbols
src/k_means_cluster.js4 symbols
src/ckmeans.js4 symbols
src/weighted_quantile.js3 symbols
src/quantile_rank_sorted.js3 symbols
src/wilcoxon_rank_sum.js2 symbols
src/quickselect.js2 symbols
src/perceptron.d.ts2 symbols
src/bayesian_classifier.d.ts2 symbols

Dependencies from manifests, versioned

@biomejs/biome2.4.16 · 1×
@changesets/cli2.31.0 · 1×
@rollup/plugin-buble1.0.3 · 1×
@rollup/plugin-terser1.0.0 · 1×
benchmark2.1.4 · 1×
d3-array1.2.0 · 1×
documentation14 · 1×
jstat1.7.0 · 1×
markdown-table1.1.0 · 1×
mathjs3.11.4 · 1×
random-js2.1.0 · 1×
rollup4.62.2 · 1×

For agents

$ claude mcp add simple-statistics \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact