UNPKG

als-statistics

Version:

Modular JS statistics toolkit for Node.js and the browser: descriptive stats, correlations (Pearson/Spearman/Kendall), t-tests & ANOVA (Student/Welch), reliability (Cronbach’s alpha), regression (linear/logistic), clustering (DBSCAN/HDBSCAN), and table/co

25 lines (20 loc) 734 B
import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; import { ALL_TOOLS } from './registry.js'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const OUT = path.join(__dirname, 'golden_v2.json'); const SEED = 'golden-ALL-v2'; function main() { const records = []; for (const tool of ALL_TOOLS) { for (let i=0; i<tool.cases; i++) { const input = tool.gen(SEED, i); const result = tool.compute(input); records.push({ v:2, tool: tool.id, seed: SEED, i, input, result }); } } fs.writeFileSync(OUT, JSON.stringify({ version: 2, records }, null, 2)); console.log('Golden v2 written:', OUT, `records=${records.length}`); } main();