Skip to main content

tseda

tseda logo

Python License Status


tseda is a Python package for analyst-guided time-series assessment, decomposition, diagnostics, and audit-ready observation logging. It first determines whether a series is suitable for deterministic SSA. If supported, it then applies window selection, component grouping, and periodic verification to produce a traceable trend/seasonality/noise analysis.

The package is intended for cold-start exploration, not automatic model building. It explicitly stops deterministic decomposition for diffuse noise or stochastic persistence and recommends a more appropriate stochastic/differenced approach.

What it helps with

Why it exists

The first question is not "which model should I fit?" but "is deterministic decomposition defensible for this series?" tseda makes that assessment before presenting SSA grouping controls.

Key considerations

  • tseda is an exploratory tool that provides a quick baseline for understanding a dataset's variance components and overall characteristics. It gives analysts a starting point for deeper tuning and refinement, helps modelers understand the variance structure before building a pipeline, and may be sufficient for quick operating-condition checks or a first-pass read of a series.
  • The window size and other analysis parameters can be manually set by the expert user in the UI. All algorithmic parameters are configurable, and by inspecting the repository you can understand the specific methods used in the software and tune them for your context.
  • The notebook API exposes the same process classification, grouping, diagnostics, and reporting workflow as the UI.

How is it used?

tseda supports a three-step workflow:

  1. initial assessment of the signal,
  2. decomposition and grouping of the signal components,
  3. validation and observation logging.

The package is designed to work both in a browser-based UI and in Python notebooks, with the same core workflow exposed in both environments.

From raw series to reviewable analysis

A typical analysis moves from identifying meaningful segments, through decomposition and grouping, to validation and recorded observations. The same workflow can be explored in the UI or reproduced through the notebook API.

Three-step tseda workflow showing signal assessment, decomposition and grouping, and validation with observation logging

This progression makes the analytical decisions visible: first define the regime being studied, then identify its components, and finally check whether the result is statistically reasonable and worth preserving.

What happens to a series

Within that workflow, tseda applies a classification-first sequence before it attributes deterministic components. In particular, diffuse noise and stochastic persistence are explicit stopping outcomes rather than being forced into a trend/seasonality decomposition.

flowchart TD
    A[Series + scope] --> B[Validate input and cadence]
    B --> C[Check identifiability and cycle support]
    C --> D{Process type?}
    D -->|Diffuse noise| N[Stop: diffuse_noise]
    D -->|Stochastic persistence| P[Stop: stochastic_persistence<br/>recommend differenced model]
    D -->|Deterministic trend| E[Verify trend + residual behavior]
    D -->|Periodic / mixed| F[Verify periodic pairs and trend interactions]
    E --> G[Group components and attribute variance]
    F --> G
    G --> H[Residual diagnostics and final report]

See the decomposition process specification for the detailed ordered procedure, component-attribution rules, and the recommended actions for each process classification.

Method details

  • Decomposition process specification describes the sequential suitability gates and the point at which tseda stops or proceeds to deterministic SSA.
  • Window selection describes cadence-based SSA window initialization, candidate periods, and refinement.
  • Seasonality decomposition describes how paired SSA modes, period evidence, cycle support, and independent spectral checks verify a seasonal component.

Installation

python -m venv .venv
source .venv/bin/activate
pip install tseda

Then run:

tseda

Quick start

from tseda.notebook_api import NotebookThreeStepAPI, load_example_series

series = load_example_series("coffee_prices")
api = NotebookThreeStepAPI(series)

kde_fig = api.get_kde_plot(show_kde=True, bin_algorithm="scott")
acf_fig = api.get_acf_plot(lags=30)

process = api.get_process_analysis()
print(process["process_classification"])

if process["decomposition_suitability"]["status"] == "suitable":
    grouping, dw_ok = api.suggest_grouping_with_window_autotune()
    recon_fig = api.get_reconstruction_plot()
    metadata = api.get_reconstruction_metadata()
else:
    print(process["decomposition_suitability"]["reason"])

summary = api.generate_observation_text()

# Build a versioned, machine-readable record without saving it.
record = api.build_evidence_record(
    dataset_name="coffee_prices",
    analyst_note="Reviewed for forecasting suitability.",
)
assert api.validate_evidence_record(record) == []
result = api.save_evidence_record("analysis_kb.rdf", record=record)
print(result["run_id"])

For a stochastic-persistence result, tseda stops deterministic SSA exploration. This guardrail matters because visual smoothing of a pure random walk can create pareidolia: apparent trends or cycles that are not deterministic structure. The recommended next step is a random-walk, ARIMA/differenced, local-level, or state-space model; any residual or innovation series is a separate new analysis.

Evidence capture is explicit: running an analysis does not modify a KMDS knowledge base. The UI and notebook API build the same schema-versioned record containing input validation, configuration, segmentation, process evidence, the decision, reconstruction diagnostics, analyst context, recommendations, warnings, and software provenance. Analyst edits remain separate from generated narrative text.

UI Example Illustrations

For examples of using tseda with the UI, please see the following links:

Testing

Testing covers heterogeneous real-world and benchmark conditions with explicit full-series and active-regime process classifications. The suite distinguishes diffuse noise, stochastic persistence, deterministic trend, stationary irregular variation, and verified periodic structure. Durbin-Watson is reported as a residual diagnostic and boundary distance, not used to force a semantic decomposition. For the detailed test setup, generated report, full results table, exact running instructions, and complete outcomes, see documents/test_datasets_report.md.

Classifier behavior is evaluated in two complementary studies:

  • Synthetic process-identification studies — known DGPs profile tseda's suitability and process-classification strengths, blind spots, and cases where secondary validation is advisable.
  • Cross-method validation — accepted real-data reconstructions are compared with default STL/MSTL after those methods receive the known period, separating conditional reconstruction agreement from blind classifier performance.

The synthetic study establishes how the classifier behaves against ground truth; the cross-method study checks whether subsequent reconstruction variance is broadly consistent with established decomposition methods. They should be read together, not as competing measures of the same task.

More information

Metadata

Release files for tseda 3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tseda 3.4
File Size Uploaded Provenance Actions
tseda-3.4.tar.gz 955.3 kB Without provenance Details for tseda-3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tseda 3.4
File Interpreter ABI Platform Actions
tseda-3.4-py3-none-any.whl Python 3 none any Details for tseda-3.4-py3-none-any.whl

Total release size: 1.9 MB

Release files / tseda-3.4.tar.gz

Download URL tseda-3.4.tar.gz
Size 955.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c77d9a30adb9ff29ae4cdd022f29bccb2240db438112a389cd93191d9961a415
BLAKE2b-256 checksum
How to use checksums
8c448e22086df3bb0849a14a915cdcff3caa46869907c0c5e9a98b961fc08169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / tseda-3.4-py3-none-any.whl

Download URL tseda-3.4-py3-none-any.whl
Size 939.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03cab86f6bbb1f99ed66e7ff381f556b08b0cf0cb422ed7a71889dc88a61d101
BLAKE2b-256 checksum
How to use checksums
35ff7a4b1973b5f7250ded6d8b5ad0db2b9b21ea3715688240392800a1c783f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for tseda 3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page