change opsignal → tableimport fullseye as fs; fs.ledger.spc_cusum(signal, target, k=0.5, h=5.0) (実装を直接呼ぶなら import spc; spc.spc_cusum(signal, target, k=0.5, h=5.0)、台帳から引くなら opsspc.get("spc_cusum"))Tabular CUSUM chart for individual measurements.
signal is a 1-D series of individual measurements. With a reference value
target, a slack k (in the same units as the measurements — commonly half
the shift you want to catch) and a decision interval h::
C+_i = max(0, C+_{i-1} + (x_i - target) - k)
C-_i = max(0, C-_{i-1} - (x_i - target) - k)
starting from C+_0 = C-_0 = 0, alarming at index i when C+_i > h or
C-_i > h. Returns a dict with the c_plus / c_minus arrays, the
integer alarms indices, the first alarm index (or -1), and the echoed
target / k / h.
Ground truth (pinned in the tests): a series constant at target keeps
C+ == C- == 0; after a sustained upward step of size d > k the upper sum
grows at exactly d - k per sample.
Raises ValueError: a non-1-D / empty signal, a non-finite
target / k / h, a negative k, or a non-positive h.
py -3.11 examples/poc_spc.pytable を入力に取れる)—
change)—
Provenance: spc.py — SPC operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.