build_model
Build and estimate a Box-Jenkins-Treadway time series model for a single series, autonomously or with confirmed choices, including outlier detection and re-estimation until clean diagnosis.
Instructions
Box-Jenkins-Treadway pipeline for a single series — autonomous or guided.
Runs ONE engine (pipeline.run_full): decides the spec, estimates, adds interventions for detected outliers and re-estimates until the diagnosis is clean or max_rounds. The only difference between modes is WHO supplies each decision:
Autonomous (all spec params left at their sentinel): the heuristic DefaultPolicy decides λ, d, D, harmonics, p, q.
Guided (any of lam/d/D/p/q/n_harmonics/decision provided): those analyst/Claude-confirmed choices are honoured (ClaudePolicy) and the heuristic fills only what was left unspecified. Use after guided_identification to run the build with the confirmed spec while the outlier cycle proceeds automatically.
Always returns parameters + residual diagnosis figure; DCD/MEG at the end.
Parameters
inp_path : source .inp file — only the series is used output_path : path for the final estimated .inp max_rounds : maximum intervention-addition rounds (default 5) run_meg : run MEG stochastic seasonality test (slow; default False) lam : confirmed Box-Cox λ (0/0.5/1); -1 = let the heuristic decide d, D : confirmed differencing orders; -1 = heuristic p, q : confirmed ARMA orders; -1 = heuristic n_harmonics : confirmed cos/sin pairs (B1); -1 = heuristic decision : confirmed "A"/"B1"/"B2"; "" = heuristic guion_path : (optional) path to guion.json — records the final model guion_name : version name (e.g. "PC1"); auto-assigned if empty guion_decision: brief description of the model or pipeline result guion_rationale: justification for the spec
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| D | No | ||
| d | No | ||
| p | No | ||
| q | No | ||
| lam | No | ||
| run_meg | No | ||
| decision | No | ||
| inp_path | Yes | ||
| guion_name | No | ||
| guion_path | No | ||
| max_rounds | No | ||
| n_harmonics | No | ||
| output_path | Yes | ||
| guion_decision | No | ||
| guion_rationale | No |