# API Reference


## Core: data and configuration


The dataset that passes between steps, configuration, and the registries every component joins.


[ENTRY_POINT_GROUP](ENTRY_POINT_GROUP.md#dazflow.ENTRY_POINT_GROUP)  

[FINGERPRINT_FORMAT](FINGERPRINT_FORMAT.md#dazflow.FINGERPRINT_FORMAT)  

[STEP_NUMBERS](STEP_NUMBERS.md#dazflow.STEP_NUMBERS)  

[Config](Config.md#dazflow.Config)  
Base class of every configuration: YAML on disk, JSON Schema for tools.

[Dataset](Dataset.md#dazflow.Dataset)  
A frame of series with their metadata, scenarios and a log of changes.

[LogEntry](LogEntry.md#dazflow.LogEntry)  
One change made to the data, with its reason and what it touched.

[Registry](Registry.md#dazflow.Registry)  
Components of one kind, looked up by the key configuration names them by.

[SeriesMeta](SeriesMeta.md#dazflow.SeriesMeta)  
Metadata of one series (one column of `Dataset.frame`).


## Dataset Methods


Methods for the Dataset class


[Dataset.__setattr__()](Dataset.__setattr__.md#dazflow.Dataset.__setattr__)  

[Dataset.frame](Dataset.frame.md#dazflow.Dataset.frame)  
A copy of the data: changing it does not change the dataset.

[Dataset.series](Dataset.series.md#dazflow.Dataset.series)  
Read-only mapping from column name to `SeriesMeta`, in column order.

[Dataset.scenarios](Dataset.scenarios.md#dazflow.Dataset.scenarios)  
A copy of the scenarios frame, or None.

[Dataset.severity](Dataset.severity.md#dazflow.Dataset.severity)  
Scenario labels from mildest to most severe; empty without scenarios.

[Dataset.log](Dataset.log.md#dazflow.Dataset.log)  
Every change made to the data, oldest first.

[Dataset.columns](Dataset.columns.md#dazflow.Dataset.columns)  

[Dataset.is_panel](Dataset.is_panel.md#dazflow.Dataset.is_panel)  
True when indexed by `(segment, period)`.

[Dataset.segments](Dataset.segments.md#dazflow.Dataset.segments)  
Segment labels in order of appearance; empty for a single-segment dataset.

[Dataset.targets](Dataset.targets.md#dazflow.Dataset.targets)  

[Dataset.drivers](Dataset.drivers.md#dazflow.Dataset.drivers)  

[Dataset.fingerprint()](Dataset.fingerprint.md#dazflow.Dataset.fingerprint)  
SHA-256 (lowercase hex) of the canonical form of the frame, metadata and scenarios.

[Dataset.__repr__()](Dataset.__repr__.md#dazflow.Dataset.__repr__)  

[Dataset.with_frame()](Dataset.with_frame.md#dazflow.Dataset.with_frame)  
A dataset with new data; metadata is kept for columns still present.

[Dataset.with_series()](Dataset.with_series.md#dazflow.Dataset.with_series)  
A dataset with one column's metadata fields changed.

[Dataset.with_scenarios()](Dataset.with_scenarios.md#dazflow.Dataset.with_scenarios)  
A dataset with other scenarios (or none, when `scenarios` is None).

[Dataset.with_log()](Dataset.with_log.md#dazflow.Dataset.with_log)  
A dataset with `entry` appended to the log.

[Dataset.select()](Dataset.select.md#dazflow.Dataset.select)  
A dataset with only `columns`, in that order, and their metadata.


## Registry Methods


Methods for the Registry class


[Registry.kind](Registry.kind.md#dazflow.Registry.kind)  

[Registry.protocol](Registry.protocol.md#dazflow.Registry.protocol)  

[Registry.register()](Registry.register.md#dazflow.Registry.register)  
Decorator: register the decorated class or function under `key`.

[Registry.add()](Registry.add.md#dazflow.Registry.add)  
Register `obj` under `key`; a taken key is refused.

[Registry.get()](Registry.get.md#dazflow.Registry.get)  
The component registered under `key`; `UnknownKeyError` lists the known keys.

[Registry.keys()](Registry.keys.md#dazflow.Registry.keys)  
Every registered key, sorted.

[Registry.__contains__()](Registry.__contains__.md#dazflow.Registry.__contains__)  

[Registry.__iter__()](Registry.__iter__.md#dazflow.Registry.__iter__)  

[Registry.__len__()](Registry.__len__.md#dazflow.Registry.__len__)  

[Registry.__repr__()](Registry.__repr__.md#dazflow.Registry.__repr__)  


## Core: results, gates and findings


What every step returns: its checks, gate, overrides and finding.


[Check](Check.md#dazflow.Check)  
One test: `observed <op> threshold` passes.

[Comparison](Comparison.md#dazflow.Comparison)  

[Finding](Finding.md#dazflow.Finding)  
One or two sentences stating a step's result.

[Gate](Gate.md#dazflow.Gate)  
The checks that end a step. It passes when every check passes or is overridden.

[Override](Override.md#dazflow.Override)  
Accepts a failed check, with the reason written in configuration.

[StepResult](StepResult.md#dazflow.StepResult)  
The shared fields of a step's result; each step subclasses it with typed values.


## Core: artefacts


Tables and figures as data, with stable identifiers.


[Artefact](Artefact.md#dazflow.Artefact)  

[ArtefactIds](ArtefactIds.md#dazflow.ArtefactIds)  
The identifiers of one step's artefacts, fixed by name, not by creation order.

[Column](Column.md#dazflow.Column)  
One table column: its key, its plain-language label, its unit and the kind of value.

[Figure](Figure.md#dazflow.Figure)  
A chart for a document, as data: x values, layers, labelled axes, a caption and a source.

[Layer](Layer.md#dazflow.Layer)  
One thing drawn on a figure, against the figure's shared x values.
Where an artefact's numbers come from: the run, the data and the date.

[Table](Table.md#dazflow.Table)  
A table for a document: labelled columns, rows of plain values, a caption and a source.


## Core: errors


Every error dazflow raises is a `DazflowError`.


[ArtefactError](ArtefactError.md#dazflow.ArtefactError)  
A `Table`, `Figure`, `Source`, `Section`, `Document` or artefact identifier is not valid.

[BuildError](BuildError.md#dazflow.BuildError)  
Candidate models cannot be built as configured (unknown drivers or forms, no data).

[CheckError](CheckError.md#dazflow.CheckError)  
A data-quality check cannot be evaluated as configured, such as a downturn that cannot be read.

[CleanError](CleanError.md#dazflow.CleanError)  
The clean step cannot treat the data as configured, such as a treatment naming an unknown period.

[ConfigError](ConfigError.md#dazflow.ConfigError)  
A configuration could not be read, parsed or validated.

[DatasetError](DatasetError.md#dazflow.DatasetError)  
A `Dataset` or its metadata is not valid.

[DazflowError](DazflowError.md#dazflow.DazflowError)  
Base class of every error raised by dazflow.

[DiagnoseError](DiagnoseError.md#dazflow.DiagnoseError)  
The chosen model cannot be diagnosed as configured (no model, a back-test, a break).

[DuplicateKeyError](DuplicateKeyError.md#dazflow.DuplicateKeyError)  
A key is already taken in a registry.

[EvaluationError](EvaluationError.md#dazflow.EvaluationError)  
A splitter, metric or rolling-origin evaluation cannot run as configured.

[ExploreError](ExploreError.md#dazflow.ExploreError)  
The explore step cannot profile, test or screen the series as configured.

[FindingError](FindingError.md#dazflow.FindingError)  
A `Finding` template could not be filled with its values.

[ForecastError](ForecastError.md#dazflow.ForecastError)  
The chosen model cannot be forecast as configured (scenarios, horizon or correction).

[GateError](GateError.md#dazflow.GateError)  
A `Check`, `Gate` or `Override` is not valid, such as an override without a reason.

[IngestError](IngestError.md#dazflow.IngestError)  
The ingest step cannot put its inputs on one calendar as configured.

[MissingExtraError](MissingExtraError.md#dazflow.MissingExtraError)  
An optional package is not installed; `extra` names the `dazflow` extra that has it.

[ModelError](ModelError.md#dazflow.ModelError)  
A model form cannot be fitted, predicted or refitted as asked, such as missing values or drivers.

[PipelineError](PipelineError.md#dazflow.PipelineError)  
A pipeline cannot be built or run as configured, such as an unknown step or order.

[PluginError](PluginError.md#dazflow.PluginError)  
A `dazflow.plugins` entry point failed to load.

[ProjectError](ProjectError.md#dazflow.ProjectError)  
A project folder cannot be created, read or written, or its run record is missing.

[ReaderError](ReaderError.md#dazflow.ReaderError)  
Data could not be read, or its dates could not be put on a calendar.

[RecordError](RecordError.md#dazflow.RecordError)  
A run record cannot be read, is of another schema version, or does not match its data.

[RegistryError](RegistryError.md#dazflow.RegistryError)  
A component could not be registered or looked up.

[RenderError](RenderError.md#dazflow.RenderError)  
An artefact could not be rendered in the format asked for.

[ReportError](ReportError.md#dazflow.ReportError)  
A report cannot be built as configured, such as from something that is not a run record.

[ResultError](ResultError.md#dazflow.ResultError)  
A `StepResult` is not valid or could not be rebuilt from its dictionary.

[SelectError](SelectError.md#dazflow.SelectError)  
Candidates cannot be ranked or chosen as configured (benchmark, choice or scenarios).

[TransformError](TransformError.md#dazflow.TransformError)  
A transform could not be applied or inverted, such as the log of a value that is not positive.

[UnknownKeyError](UnknownKeyError.md#dazflow.UnknownKeyError)  
No component is registered under the key; `known` lists the keys that are.


## Readers


Read input files and frames into a dataset's calendar.


[readers.FREQUENCIES](readers.FREQUENCIES.md#dazflow.readers.FREQUENCIES)  

[readers.ReadSpec](readers.ReadSpec.md#dazflow.readers.ReadSpec)  
What to read and how to put its dates on a calendar.

[readers.Reader](readers.Reader.md#dazflow.readers.Reader)  
A data source. `Config` holds its own options; `read` returns a `Dataset`.

[readers.ScenarioInput](readers.ScenarioInput.md#dazflow.readers.ScenarioInput)  
A CSV of driver paths in levels: a scenario label column, dates and one column per driver.

[readers.from_frame()](readers.from_frame.md#dazflow.readers.from_frame)  
A `Dataset` from a pandas or polars frame or a pyarrow table.

[readers.get](readers.get.md#dazflow.readers.get)  

[readers.read()](readers.read.md#dazflow.readers.read)  
Read the data `spec` names into a `Dataset` with one column per series.

[readers.read_scenarios()](readers.read_scenarios.md#dazflow.readers.read_scenarios)  
The scenario frame, indexed by `(scenario, period)`, and the severity order, from a CSV.

[readers.register](readers.register.md#dazflow.readers.register)  

[readers.registry](readers.registry.md#dazflow.readers.registry)  

[readers.require()](readers.require.md#dazflow.readers.require)  
Import an optional `module`, or raise `MissingExtraError` naming `dazflow[extra]`.

[readers.scenario_cover()](readers.scenario_cover.md#dazflow.readers.scenario_cover)  
How many consecutive periods after `end` one scenario's `paths` (indexed by period) cover.


## Quality checks


The checks clean runs; register your own the same way.


[checks.CheckConfig](checks.CheckConfig.md#dazflow.checks.CheckConfig)  
What every check's configuration holds: whether it runs, where, and its thresholds.

[checks.Context](checks.Context.md#dazflow.checks.Context)  
What a check may need beyond the series itself.

[checks.Downturn](checks.Downturn.md#dazflow.checks.Downturn)  
A period the history must cover, such as a recession, named in configuration.

[checks.Level](checks.Level.md#dazflow.checks.Level)  

[checks.Outcome](checks.Outcome.md#dazflow.checks.Outcome)  
One check on one series: how many units failed, the level reached and the gate check.

[checks.QualityCheck](checks.QualityCheck.md#dazflow.checks.QualityCheck)  
A data-quality check: its `Config` and the units it tests on one series.

[checks.Test](checks.Test.md#dazflow.checks.Test)  

[checks.Units](checks.Units.md#dazflow.checks.Units)  
The periods a check tests (the index of `values`) and what each value must satisfy.

[checks.evaluate()](checks.evaluate.md#dazflow.checks.evaluate)  
Run one check on one series with pointblank; the series is not changed.

[checks.get](checks.get.md#dazflow.checks.get)  

[checks.outlier_scores()](checks.outlier_scores.md#dazflow.checks.outlier_scores)  
Robust z-scores of `x`'s residuals from an STL decomposition, on its present values.

[checks.register](checks.register.md#dazflow.checks.register)  

[checks.registry](checks.registry.md#dazflow.checks.registry)  


## Transforms


Named, invertible transforms recorded as text.


[transforms.Transform](transforms.Transform.md#dazflow.transforms.Transform)  
What a transform provides. Built-ins and plugins are classes registered by key.

[transforms.TransformSpec](transforms.TransformSpec.md#dazflow.transforms.TransformSpec)  
One transform of a chain: its registry key and its parameters.

[transforms.apply()](transforms.apply.md#dazflow.transforms.apply)  
A dataset with `column` transformed by `chain`, the resolved chain appended to its metadata.

[transforms.consumed()](transforms.consumed.md#dazflow.transforms.consumed)  
How many leading periods a resolved chain leaves without a value.

[transforms.forward()](transforms.forward.md#dazflow.transforms.forward)  
Apply `chain` to `x`, in order.

[transforms.get](transforms.get.md#dazflow.transforms.get)  

[transforms.inverse()](transforms.inverse.md#dazflow.transforms.inverse)  
Undo a resolved `chain`, giving levels on `y`'s periods.

[transforms.parse()](transforms.parse.md#dazflow.transforms.parse)  
A `TransformSpec` from its text form; its parameters validated by the transform's `Config`.

[transforms.register](transforms.register.md#dazflow.transforms.register)  

[transforms.registry](transforms.registry.md#dazflow.transforms.registry)  


## Model forms


The model forms, the protocol a new form follows, and the stored model record.


[models.DEFAULT_LEVELS](models.DEFAULT_LEVELS.md#dazflow.models.DEFAULT_LEVELS)  

[models.RECORD_FORMAT](models.RECORD_FORMAT.md#dazflow.models.RECORD_FORMAT)  

[models.TREND](models.TREND.md#dazflow.models.TREND)  

[models.Design](models.Design.md#dazflow.models.Design)  
A candidate's data: target and drivers transformed, drivers lagged, a trend, a sample.

[models.Fitted](models.Fitted.md#dazflow.models.Fitted)  
What a fitted model provides (design §6).

[models.FittedModel](models.FittedModel.md#dazflow.models.FittedModel)  
Base class of the built-in fitted models.

[models.Forecast](models.Forecast.md#dazflow.models.Forecast)  
A forecast path: the mean and the prediction interval at each level, by period.

[models.Model](models.Model.md#dazflow.models.Model)  
What a model form provides: its `Config` and `fit(y, X) -> Fitted`.

[models.ModelForm](models.ModelForm.md#dazflow.models.ModelForm)  
Base class of the built-in forms: holds the validated `Config`, checks the data.

[models.ModelRecord](models.ModelRecord.md#dazflow.models.ModelRecord)  
A fitted model as stored: specification, parameters, covariance and data fingerprint.

[models.ModelSpec](models.ModelSpec.md#dazflow.models.ModelSpec)  
What a fit needs besides the data: the form, its configuration, the series' names.

[models.Sample](models.Sample.md#dazflow.models.Sample)  
The periods a model was fitted on.

[models.fingerprint()](models.fingerprint.md#dazflow.models.fingerprint)  
The `Dataset` fingerprint of the target and drivers, as a record stores it.

[models.get](models.get.md#dazflow.models.get)  

[models.newey_west_lags()](models.newey_west_lags.md#dazflow.models.newey_west_lags)  
The Newey-West rule of thumb, `floor(4 (n / 100) ** (2 / 9))`.

[models.refit()](models.refit.md#dazflow.models.refit)  
Fit a model again from its stored specification, on the data it was fitted on.

[models.register()](models.register.md#dazflow.models.register)  
Decorator: register a model form under `key`, which its specifications name it by.

[models.registry](models.registry.md#dazflow.models.registry)  

[models.season_length()](models.season_length.md#dazflow.models.season_length)  
Periods per year of a monthly (12), quarterly (4) or annual (1) index.


## Evaluation


Rolling-origin evaluation: splitters, metrics and scores.


[evaluation.DEFAULT_METRICS](evaluation.DEFAULT_METRICS.md#dazflow.evaluation.DEFAULT_METRICS)  

[evaluation.MAE](evaluation.MAE.md#dazflow.evaluation.MAE)  
Mean absolute error, `mean |actual - forecast|`.

[evaluation.MASE](evaluation.MASE.md#dazflow.evaluation.MASE)  
Mean absolute scaled error (Hyndman and Koehler, 2006).

[evaluation.RMSE](evaluation.RMSE.md#dazflow.evaluation.RMSE)  
Root mean squared error, `sqrt(mean (actual - forecast)^2)`.

[evaluation.Coverage](evaluation.Coverage.md#dazflow.evaluation.Coverage)  
Share of actual values within the interval, bounds included.

[evaluation.Evaluation](evaluation.Evaluation.md#dazflow.evaluation.Evaluation)  
What `evaluate` returns: the folds, every forecast value and the scores.

[evaluation.EvaluationRow](evaluation.EvaluationRow.md#dazflow.evaluation.EvaluationRow)  
One forecast value: its fold, origin, period and horizon, the actual and the forecast.

[evaluation.Expanding](evaluation.Expanding.md#dazflow.evaluation.Expanding)  
Origins that train on every period up to them, from `initial` periods on.

[evaluation.Fold](evaluation.Fold.md#dazflow.evaluation.Fold)  
One origin: the training and test positions, each `(start, stop)`, stop excluded.

[evaluation.Metric](evaluation.Metric.md#dazflow.evaluation.Metric)  
What a metric provides: its `Config` and `score(actual, forecast, ...) -> float`.

[evaluation.Rolling](evaluation.Rolling.md#dazflow.evaluation.Rolling)  
Origins that train on the `window` periods before them.

[evaluation.Score](evaluation.Score.md#dazflow.evaluation.Score)  
A metric's value over every forecast (`horizon` None) or over one horizon.

[evaluation.Splitter](evaluation.Splitter.md#dazflow.evaluation.Splitter)  
What a splitter provides: its `Config` and `split(index) -> folds`.

[evaluation.evaluate()](evaluation.evaluate.md#dazflow.evaluation.evaluate)  
Refit `model` at every origin of `splitter` and score its forecasts.

[evaluation.metrics](evaluation.metrics.md#dazflow.evaluation.metrics)  

[evaluation.splitters](evaluation.splitters.md#dazflow.evaluation.splitters)  


## Rendering


House-style tables, figures and Word documents.


[render.HOUSE_MPLSTYLE](render.HOUSE_MPLSTYLE.md#dazflow.render.HOUSE_MPLSTYLE)  

[render.SUFFIXES](render.SUFFIXES.md#dazflow.render.SUFFIXES)  

[render.Captions](render.Captions.md#dazflow.render.Captions)  
Caption and source-note templates (jinja2, as findings are).

[render.Dates](render.Dates.md#dazflow.render.Dates)  
How date cells and the source note's date are written (a `strftime` format).

[render.Document](render.Document.md#dazflow.render.Document)  
A model document: a title and sections.

[render.Figures](render.Figures.md#dazflow.render.Figures)  
Figures: the font matplotlib draws with, the colours, PNG resolution, an extra mplstyle.

[render.Fonts](render.Fonts.md#dazflow.render.Fonts)  
Text in Word and HTML. Word takes its fonts from `Word.reference` when one is given.

[render.Mark](render.Mark.md#dazflow.render.Mark)  
How one check status is marked in a table.

[render.Marks](render.Marks.md#dazflow.render.Marks)  
Pass, fail and overridden, marked in place in words and colour.

[render.Numbers](render.Numbers.md#dazflow.render.Numbers)  
How numbers are written: in tables, and in findings' numeric values.

[render.Page](render.Page.md#dazflow.render.Page)  
The text width of the page: tables and figures are laid out to it.

[render.Renderable](render.Renderable.md#dazflow.render.Renderable)  

[render.Renderer](render.Renderer.md#dazflow.render.Renderer)  
Writes artefacts in one format.

[render.Section](render.Section.md#dazflow.render.Section)  
A headed part of a document: paragraphs of text, findings, tables, figures, subsections.

[render.Style](render.Style.md#dazflow.render.Style)  
Everything that decides how an artefact looks, in one file per organisation.

[render.Word](render.Word.md#dazflow.render.Word)  
Word output: the organisation's reference document and its table style.

[render.caption_text()](render.caption_text.md#dazflow.render.caption_text)  
`Table T3.1. Caption`, from the style's caption template.

[render.finding_text()](render.finding_text.md#dazflow.render.finding_text)  
The finding's sentence, with the style's template for its key and numbers in the style.

[render.format_cell()](render.format_cell.md#dazflow.render.format_cell)  
One table cell as text: numbers, percentages, dates and statuses in the style.

[render.format_date()](render.format_date.md#dazflow.render.format_date)  
An ISO date (or a `date`) in the style's date format.

[render.format_number()](render.format_number.md#dazflow.render.format_number)  
`value` with the style's decimals and separators; a value that rounds to zero has no sign.

[render.load_style()](render.load_style.md#dazflow.render.load_style)  
The style to render with.

[render.render()](render.render.md#dazflow.render.render)  
`obj` in `format` (a renderer key: docx, html, markdown, png, svg), in the style.

[render.renderers](render.renderers.md#dazflow.render.renderers)  
Renderers by format, in a registry like every other component (design §6), and `render`.

[render.source_text()](render.source_text.md#dazflow.render.source_text)  
The source note: the note, the run, the dataset fingerprint and the date.

[render.to_great_table()](render.to_great_table.md#dazflow.render.to_great_table)  
The table as a great-tables `GT`, its cells already written in the style.

[render.write()](render.write.md#dazflow.render.write)  
Render `obj` to the file `path`, the format from its suffix unless `format` is given.


## Steps


The step registry and the protocol a step follows.


[steps.Step](steps.Step.md#dazflow.steps.Step)  
A step module: its configuration, its result type and the function that runs it.

[steps.registry](steps.registry.md#dazflow.steps.registry)  


## Step: ingest


Read the inputs and put every series on one calendar.


[ingest.IDS](ingest.IDS.md#dazflow.ingest.IDS)  

[ingest.IngestConfig](ingest.IngestConfig.md#dazflow.ingest.IngestConfig)  
Configuration of the ingest step.

[ingest.IngestResult](ingest.IngestResult.md#dazflow.ingest.IngestResult)  
What ingest returns. `dataset` is left out of `to_dict()`; `fingerprint` identifies it.

[ingest.Input](ingest.Input.md#dazflow.ingest.Input)  
One input: a file read by a reader, or a frame passed to `run` under the same name.

[ingest.SeriesSpec](ingest.SeriesSpec.md#dazflow.ingest.SeriesSpec)  
One series to take from the inputs, with its metadata and how to align it.

[ingest.run()](ingest.run.md#dazflow.ingest.run)  
Read the inputs and put the configured series on one calendar.


## Step: clean


Data-quality checks, configured treatments and their log.


[clean.IDS](clean.IDS.md#dazflow.clean.IDS)  

[clean.CleanConfig](clean.CleanConfig.md#dazflow.clean.CleanConfig)  
Configuration of the clean step: one section per check, the treatments, overrides.

[clean.CleanResult](clean.CleanResult.md#dazflow.clean.CleanResult)  
What clean returns. `dataset` is left out of `to_dict()`; `fingerprint` identifies it.

[clean.Exclude](clean.Exclude.md#dazflow.clean.Exclude)  
Exclude periods: their values become missing and no check counts them as missing.

[clean.Fill](clean.Fill.md#dazflow.clean.Fill)  
Fill missing values from the previous or next value, or with a given value.

[clean.Interpolate](clean.Interpolate.md#dazflow.clean.Interpolate)  
Fill missing values inside the history linearly between their neighbours.

[clean.Replace](clean.Replace.md#dazflow.clean.Replace)  
Replace values at named periods by `value`, or linearly from their neighbours.

[clean.Treatment](clean.Treatment.md#dazflow.clean.Treatment)  

[clean.TreatmentRecord](clean.TreatmentRecord.md#dazflow.clean.TreatmentRecord)  
One value changed by a treatment, or a treatment of one series that changed none.

[clean.Winsorise](clean.Winsorise.md#dazflow.clean.Winsorise)  
Clip values to the series' `lower` and `upper` quantiles.

[clean.run()](clean.run.md#dazflow.clean.run)  
Check the data, apply the configured treatments, and check again.


## Step: explore


Each series alone, each driver against the target.


[explore.IDS](explore.IDS.md#dazflow.explore.IDS)  

[explore.ExploreConfig](explore.ExploreConfig.md#dazflow.explore.ExploreConfig)  
Configuration of the explore step.

[explore.ExploreResult](explore.ExploreResult.md#dazflow.explore.ExploreResult)  
What explore returns. `dataset` (left out of `to_dict()`) holds the transformed series.

[explore.Integration](explore.Integration.md#dazflow.explore.Integration)  
A series' order of integration and the levels tested to reach it.

[explore.LagProfile](explore.LagProfile.md#dazflow.explore.LagProfile)  
Correlations of the target with a driver lagged 0 to `max_lag` periods.

[explore.Level](explore.Level.md#dazflow.explore.Level)  
The four tests on the series differenced `differences` times, around `trend`.

[explore.Profile](explore.Profile.md#dazflow.explore.Profile)  
One series' profile, on its values from the first to the last present one.

[explore.ProfileConfig](explore.ProfileConfig.md#dazflow.explore.ProfileConfig)  
How each series is profiled.

[explore.Screen](explore.Screen.md#dazflow.explore.Screen)  
A single-driver regression, target on a constant and the driver at `lag`.

[explore.StationarityConfig](explore.StationarityConfig.md#dazflow.explore.StationarityConfig)  
How the four tests are run and read together into an order of integration.

[explore.UnitRoot](explore.UnitRoot.md#dazflow.explore.UnitRoot)  
One test on one level of differencing. `stationary` reads it at `alpha`.

[explore.driver_checks()](explore.driver_checks.md#dazflow.explore.driver_checks)  
The gate checks of one screened driver, before overrides.

[explore.integration_order()](explore.integration_order.md#dazflow.explore.integration_order)  
The order of integration of `x`, from the four tests read together (`StationarityConfig`).

[explore.lag_search()](explore.lag_search.md#dazflow.explore.lag_search)  
Correlate `y` with `x` lagged 0 to `max_lag` periods and pick the strongest lag.

[explore.newey_west_lags()](explore.newey_west_lags.md#dazflow.explore.newey_west_lags)  
The Newey-West (1994) rule of thumb, floor(4 (n / 100)^(2/9)).

[explore.profile()](explore.profile.md#dazflow.explore.profile)  
Profile one series: trend and seasonal strength, autocorrelation, volatility, intermittency.

[explore.run()](explore.run.md#dazflow.explore.run)  
Profile and test every numeric series, transform each, and screen each driver.

[explore.says_stationary()](explore.says_stationary.md#dazflow.explore.says_stationary)  
Whether a test's p-value says stationary at `alpha`.

[explore.screen()](explore.screen.md#dazflow.explore.screen)  
Regress `y` on a constant and `x` lagged `lag` periods, with HAC standard errors.

[explore.unit_root()](explore.unit_root.md#dazflow.explore.unit_root)  
ADF, DFGLS, Phillips-Perron and KPSS (arch) on `x`, around a constant or a trend.


## Step: build


Candidate models within the declared signs and exclusions.


[build.IDS](build.IDS.md#dazflow.build.IDS)  

[build.BuildConfig](build.BuildConfig.md#dazflow.build.BuildConfig)  
Configuration of the build step.

[build.BuildResult](build.BuildResult.md#dazflow.build.BuildResult)  
What build returns: every candidate fitted, and the passing ones.

[build.Candidate](build.Candidate.md#dazflow.build.Candidate)  
One fitted model: its form, drivers, design, stored record and checks.

[build.Coefficient](build.Coefficient.md#dazflow.build.Coefficient)  
One parameter: estimate, standard error, z and two-sided normal p-value.

[build.FormSpec](build.FormSpec.md#dazflow.build.FormSpec)  
A model form by registry key, with its configuration (`ols` or `{form: ols, config: ...}`).

[build.combinations()](build.combinations.md#dazflow.build.combinations)  
Every set of 1 to `max_size` drivers that holds no excluded pair.

[build.run()](build.run.md#dazflow.build.run)  
Search driver combinations and fit the forms and benchmarks on the series in levels.

[build.stepwise()](build.stepwise.md#dazflow.build.stepwise)  
Forward stepwise search: the sets met adding, each step, the driver that lowers the criterion most.

[build.vif()](build.vif.md#dazflow.build.vif)  
Variance inflation factors: `1 / (1 - R²)` of each column on a constant and the others.


## Step: select


Rank the candidates out of sample and propose a default.


[select.IDS](select.IDS.md#dazflow.select.IDS)  

[select.CandidateEvaluation](select.CandidateEvaluation.md#dazflow.select.CandidateEvaluation)  
A candidate's rolling-origin evaluation, or why it has none (`note`).

[select.Choice](select.Choice.md#dazflow.select.Choice)  
The modeller's decision: the proposed candidate confirmed, or another, with a reason.

[select.ConfidenceSet](select.ConfidenceSet.md#dazflow.select.ConfidenceSet)  
The candidates arch's MCS keeps at `size`, in the losses' column order, and every p-value.

[select.MCSConfig](select.MCSConfig.md#dazflow.select.MCSConfig)  
The model confidence set: arch's `MCS` on the per-origin losses.

[select.OrderingConfig](select.OrderingConfig.md#dazflow.select.OrderingConfig)  
How projections are compared across scenarios.

[select.Ranked](select.Ranked.md#dazflow.select.Ranked)  
One row of the ranking: scores, set membership and every check select makes.

[select.RuleRow](select.RuleRow.md#dazflow.select.RuleRow)  
One candidate as the default rule sees it.

[select.ScenarioForecast](select.ScenarioForecast.md#dazflow.select.ScenarioForecast)  
A candidate's forecast under one scenario, and its mean path in the target's levels.

[select.SelectConfig](select.SelectConfig.md#dazflow.select.SelectConfig)  
Configuration of the select step.

[select.SelectResult](select.SelectResult.md#dazflow.select.SelectResult)  
What select returns: the ranking, the confidence set, the scenarios and the choice.

[select.confidence_set()](select.confidence_set.md#dazflow.select.confidence_set)  
Arch's model confidence set on `losses` (one row per origin, one column per model).

[select.default_rule()](select.default_rule.md#dazflow.select.default_rule)  
The default choice (design D38), or `None` when no passing candidate is in the set.

[select.order_check()](select.order_check.md#dazflow.select.order_check)  
The `scenario-order` check: no pair of successive scenarios out of order.

[select.out_of_order()](select.out_of_order.md#dazflow.select.out_of_order)  
How many successive scenarios, mildest first, project a less severe target than the one before.

[select.read_scenarios()](select.read_scenarios.md#dazflow.select.read_scenarios)  
The scenario frame, indexed by `(scenario, period)`, and the severity order, from a CSV.

[select.run()](select.run.md#dazflow.select.run)  
Score, rank and check every candidate of `build`, and propose a default.


## Step: forecast


The chosen model projected under every scenario.


[forecast.IDS](forecast.IDS.md#dazflow.forecast.IDS)  

[forecast.AnchorConfig](forecast.AnchorConfig.md#dazflow.forecast.AnchorConfig)  
How the gap between observed and fitted at the origin enters the forecast.

[forecast.BackTransform](forecast.BackTransform.md#dazflow.forecast.BackTransform)  
A forecast on the target's scale and how it got there.

[forecast.ForecastConfig](forecast.ForecastConfig.md#dazflow.forecast.ForecastConfig)  
Configuration of the forecast step.

[forecast.ForecastResult](forecast.ForecastResult.md#dazflow.forecast.ForecastResult)  
What forecast returns: every scenario's path on the target's scale, and how it was made.

[forecast.ReversionConfig](forecast.ReversionConfig.md#dazflow.forecast.ReversionConfig)  
A linear move towards a long-run level, on the target's scale.

[forecast.ScenarioPath](forecast.ScenarioPath.md#dazflow.forecast.ScenarioPath)  
One scenario: the model's forecast, anchored, and the forecast on the target's scale.

[forecast.SimulationConfig](forecast.SimulationConfig.md#dazflow.forecast.SimulationConfig)  
The draws of a simulated correction or interval.

[forecast.adjustment()](forecast.adjustment.md#dazflow.forecast.adjustment)  
What anchoring adds at horizons 1..h: the gap (carry), `gap (1 - decay)^h` or nothing.

[forecast.back_transform()](forecast.back_transform.md#dazflow.forecast.back_transform)  
`forecast` (on the model's scale) on the target's scale, through the resolved `chain`.

[forecast.revert()](forecast.revert.md#dazflow.forecast.revert)  
The shift moving `path` linearly towards `level`: weight h/periods, full from `periods` on.

[forecast.run()](forecast.run.md#dazflow.forecast.run)  
Forecast select's chosen model under every scenario, anchored, on the target's scale.


## Step: diagnose


The chosen model tested against its assumptions and against history.


[diagnose.IDS](diagnose.IDS.md#dazflow.diagnose.IDS)  

[diagnose.Anomaly](diagnose.Anomaly.md#dazflow.diagnose.Anomaly)  
An observation outside the interval `fitted ± z scale`, on the model's scale.

[diagnose.AnomalyConfig](diagnose.AnomalyConfig.md#dazflow.diagnose.AnomalyConfig)  
Observations outside the model's interval.

[diagnose.BacktestConfig](diagnose.BacktestConfig.md#dazflow.diagnose.BacktestConfig)  
Multi-step forecasts from past origins, through `dz.evaluation.evaluate`.

[diagnose.ChowConfig](diagnose.ChowConfig.md#dazflow.diagnose.ChowConfig)  
Chow tests at given break dates, or at fixed fractions of the sample.

[diagnose.ChowTest](diagnose.ChowTest.md#dazflow.diagnose.ChowTest)  
A Chow test at `period`: F with `df_num` and `df_denom` degrees of freedom.

[diagnose.Cusum](diagnose.Cusum.md#dazflow.diagnose.Cusum)  
The recursive CUSUM (statsmodels `RecursiveLS`) and its bounds, by period.

[diagnose.CusumConfig](diagnose.CusumConfig.md#dazflow.diagnose.CusumConfig)  
The CUSUM tests: the OLS-residual test (a p-value) and the recursive CUSUM's bounds.

[diagnose.DiagnoseConfig](diagnose.DiagnoseConfig.md#dazflow.diagnose.DiagnoseConfig)  
Configuration of the diagnose step.

[diagnose.DiagnoseResult](diagnose.DiagnoseResult.md#dazflow.diagnose.DiagnoseResult)  
What diagnose returns: every diagnostic, the stability paths, the back-test and the rest.

[diagnose.Diagnostic](diagnose.Diagnostic.md#dazflow.diagnose.Diagnostic)  
One diagnostic: its statistic and p-value, what the gate compares, or why it does not apply.

[diagnose.LagTest](diagnose.LagTest.md#dazflow.diagnose.LagTest)  
A p-value test over a number of lags.

[diagnose.PValueTest](diagnose.PValueTest.md#dazflow.diagnose.PValueTest)  
A test read by its p-value: the check passes when the p-value is at least `alpha`.

[diagnose.ResetConfig](diagnose.ResetConfig.md#dazflow.diagnose.ResetConfig)  
Ramsey's RESET: powers of the fitted values added to the regression.

[diagnose.Rolling](diagnose.Rolling.md#dazflow.diagnose.Rolling)  
Rolling-window coefficients (statsmodels `RollingOLS`), by the window's last period.

[diagnose.RollingConfig](diagnose.RollingConfig.md#dazflow.diagnose.RollingConfig)  
Rolling-window coefficients (statsmodels `RollingOLS`).

[diagnose.Sensitivity](diagnose.Sensitivity.md#dazflow.diagnose.Sensitivity)  
One response: to a shock in a driver, or to one driver's scenario path (`all`: every one).

[diagnose.SensitivityConfig](diagnose.SensitivityConfig.md#dazflow.diagnose.SensitivityConfig)  
One-at-a-time sensitivity of the forecast to each driver.

[diagnose.anomalies()](diagnose.anomalies.md#dazflow.diagnose.anomalies)  
The periods where `actual` lies outside `fitted ± z scale`, z the normal `level` quantile.

[diagnose.chow()](diagnose.chow.md#dazflow.diagnose.chow)  
Chow's F test of a break at `period`: every coefficient may change from `period` on.

[diagnose.default_lags()](diagnose.default_lags.md#dazflow.diagnose.default_lags)  
Twice the seasonal period (10 for annual data), at most a fifth of `n` (Hyndman).

[diagnose.residual_tests()](diagnose.residual_tests.md#dazflow.diagnose.residual_tests)  
The residual tests of a fitted model, in a fixed order, each applicable or with its reason.

[diagnose.run()](diagnose.run.md#dazflow.diagnose.run)  
Test select's chosen model: residuals, stability, back-test, sensitivity and anomalies.


## Step: report


The run as a model document, built from the run record alone.


[report.IDS](report.IDS.md#dazflow.report.IDS)  

[report.TITLES](report.TITLES.md#dazflow.report.TITLES)  

[report.ReplayTolerance](report.ReplayTolerance.md#dazflow.report.ReplayTolerance)  
How closely a replay must reproduce each recorded float (design D43).

[report.ReportConfig](report.ReportConfig.md#dazflow.report.ReportConfig)  
`config/report.yaml`: the document's title and file, and the replay's tolerance.

[report.ReportResult](report.ReportResult.md#dazflow.report.ReportResult)  
What report returns: the document and replay script (in memory only) and its tables.

[report.replay_script()](report.replay_script.md#dazflow.report.replay_script)  
The replay script: plain Python that reruns the project from its record and compares.

[report.run()](report.run.md#dazflow.report.run)  
Build the document, its tables and the replay script from a run record.


## Pipeline, record and replay


Run steps in order, keep the run record, and replay it.


[pipeline.ATOL](pipeline.ATOL.md#dazflow.pipeline.ATOL)  

[pipeline.DEFAULT_STEPS](pipeline.DEFAULT_STEPS.md#dazflow.pipeline.DEFAULT_STEPS)  

[pipeline.RECORD_KIND](pipeline.RECORD_KIND.md#dazflow.pipeline.RECORD_KIND)  

[pipeline.RTOL](pipeline.RTOL.md#dazflow.pipeline.RTOL)  

[pipeline.SCHEMA_VERSION](pipeline.SCHEMA_VERSION.md#dazflow.pipeline.SCHEMA_VERSION)  

[pipeline.Adapter](pipeline.Adapter.md#dazflow.pipeline.Adapter)  

[pipeline.DatasetRecord](pipeline.DatasetRecord.md#dazflow.pipeline.DatasetRecord)  
A step's dataset: its fingerprint and, when the project folder holds it, its path.

[pipeline.Difference](pipeline.Difference.md#dazflow.pipeline.Difference)  
One recorded value the replay did not reproduce: where it is, and both values.

[pipeline.Environment](pipeline.Environment.md#dazflow.pipeline.Environment)  
Where the run ran: Python, platform and the versions of dazflow and its dependencies.

[pipeline.InputRecord](pipeline.InputRecord.md#dazflow.pipeline.InputRecord)  
One input a run read: a file by the SHA-256 of its bytes, or a frame by its fingerprint.

[pipeline.Pipeline](pipeline.Pipeline.md#dazflow.pipeline.Pipeline)  
Steps placed by name, run in order, each through its adapter.

[pipeline.Replay](pipeline.Replay.md#dazflow.pipeline.Replay)  
What a replay found: the steps rerun, the tolerance and every difference.

[pipeline.Run](pipeline.Run.md#dazflow.pipeline.Run)  
One pass through a pipeline. Nothing in it has been written anywhere.

[pipeline.RunInfo](pipeline.RunInfo.md#dazflow.pipeline.RunInfo)  
When the run happened, what it ran and how it ended.

[pipeline.RunRecord](pipeline.RunRecord.md#dazflow.pipeline.RunRecord)  
The run record, written as `reports/record.json`.

[pipeline.StepInputs](pipeline.StepInputs.md#dazflow.pipeline.StepInputs)  
What a step's adapter has to call the step with.

[pipeline.adapters](pipeline.adapters.md#dazflow.pipeline.adapters)  

[pipeline.compare()](pipeline.compare.md#dazflow.pipeline.compare)  
Every difference between two JSON values, by path.

[pipeline.compare_records()](pipeline.compare_records.md#dazflow.pipeline.compare_records)  
The differences between a record and its replay, inputs first, then in pipeline order.

[pipeline.default_adapter()](pipeline.default_adapter.md#dazflow.pipeline.default_adapter)  
`step.run(dataset, config)` with the latest dataset: the common case.

[pipeline.environment()](pipeline.environment.md#dazflow.pipeline.environment)  
The running environment, with dazflow's installed version and its requirements'.

[pipeline.file_sha256()](pipeline.file_sha256.md#dazflow.pipeline.file_sha256)  
The SHA-256 of a file's bytes; a folder hashes its files' relative paths and bytes.

[pipeline.register_adapter()](pipeline.register_adapter.md#dazflow.pipeline.register_adapter)  
Decorator: the function the pipeline calls the step named `step` through.

[pipeline.replay()](pipeline.replay.md#dazflow.pipeline.replay)  
Rerun every step of `record` from its recorded configuration and inputs, and compare.


## Project folder


A project on disk: its configuration, datasets and reports.


[project.DATASET_FORMAT](project.DATASET_FORMAT.md#dazflow.project.DATASET_FORMAT)  

[project.PROJECT_FILE](project.PROJECT_FILE.md#dazflow.project.PROJECT_FILE)  

[project.RECORD_PATH](project.RECORD_PATH.md#dazflow.project.RECORD_PATH)  

[project.Project](project.Project.md#dazflow.project.Project)  
A project folder: `project.yaml`, `config/<step>.yaml`, data and reports.

[project.ProjectConfig](project.ProjectConfig.md#dazflow.project.ProjectConfig)  
`project.yaml`: the project's name, its pipeline and the settings every step shares.

[project.commented_yaml()](project.commented_yaml.md#dazflow.project.commented_yaml)  
`config` as YAML: every field in declaration order, defaults filled in, described.

[project.init()](project.init.md#dazflow.project.init)  
Create a project in `root` (new or empty) with commented defaults and example data.

[project.load()](project.load.md#dazflow.project.load)  
The project in folder `root`.

[project.read_dataset()](project.read_dataset.md#dazflow.project.read_dataset)  
The dataset `write_dataset` wrote to `path`, checked against its fingerprint.

[project.schema_path()](project.schema_path.md#dazflow.project.schema_path)  
The schema file next to a dataset CSV: `ingest.csv` -\> `ingest.schema.json`.

[project.write_dataset()](project.write_dataset.md#dazflow.project.write_dataset)  
Write `dataset` as `<path>` (CSV, first column `period`) and its schema file.


## Testing


The contract suites every component passes.


[testing.ComponentContract](testing.ComponentContract.md#dazflow.testing.ComponentContract)  
Tests every registered component passes, whatever its kind.

[testing.ModelContract](testing.ModelContract.md#dazflow.testing.ModelContract)  
Tests every model form passes (design §6, §13).

[testing.sample_series()](testing.sample_series.md#dazflow.testing.sample_series)  
A quarterly share between 0 and 1 (`loss`) and two drivers, for the model contract.
