BayesianChangePointJS
๐Pure JavaScript/TypeScript Bayesian changepoint detection for Browsers & NodeJS
Install / Use
npx skills add mathew-kurian/BayesianChangePointJSInstalls into whichever agent you are using.
README
Bayesian Online ChangePoint JS Detection
Pure JavaScript/TypeScript implementation of Bayesian Online Changepoint detection which runs for Browsers & NodeJS.
Example
import assert from "assert";
import BayesianChangePoint, { BreakPoint } from "bayesian-changepoint";
const breakpointVerifier = (
next: BreakPoint<number>,
prev: BreakPoint<number>
): boolean => {
if (Math.abs(next.data - prev.data) >= 5) {
return true;
}
return false;
};
const values = (breakPoints: BreakPoint<number>[]): number[] => {
return breakPoints.map(breakPoint => breakPoint.data);
};
const indicies = (breakPoints: BreakPoint<number>[]): number[] => {
return breakPoints.map(breakPoint => breakPoint.index);
};
const detection = new BayesianChangePoint<number>({
breakpointVerifier
});
detection.exec([10, 10, 10, 10, 5000, 5000, 5000, 5000, 30, 30, 30, 30, 30]);
assert.deepEqual(values(detection.breakPoints()), [5000, 30]);
assert.deepEqual(indicies(detection.breakPoints()), [4, 8]);
Installation
npm install
npm test
Credits
Based off of Bayesian Online Changepoint
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
Writing Hookify Rules
140.6kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
agent-tui
106.4kMain Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications programmatically for testing, automation, and inspection
review-duplication
106.4kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
