Skip to main content

Multiscale signal analysis on a normalized scale space

Project description

SignalForge

See the structure in any data, across every scale, instantly.

Install

pip install adelic-signalforge

Quick Start

# Download sample data (VIX volatility index, 2005-2012)
curl -o vix.csv "https://fred.stlouisfed.org/graph/fredgraph.csv?id=VIXCLS&cosd=2005-01-01&coed=2012-12-31"

# See the structure
sf surface vix.csv -hm --max-window 360

VIX heatmap

The 2008 financial crisis — visible across every scale at once.

Your data

sf schema mydata.csv                    # infer the structure
sf surface mydata.csv --schema my.schema.json -hm   # see it

Any CSV works. Multi-column, multi-channel, per-entity — sf schema figures it out.

Explore

sf surface data.csv -hm --baseline ewma --residual z    # what's anomalous?
sf surface data.csv -hm --start-date 2008-01 --end-date 2009-06  # zoom in
sf inspect ewma                                          # how does this work?
sf inspect                                               # what's available?

The CLI suggests what to try next. Every output leads somewhere.

Python API

import signalforge as sf

surfaces = (
    sf.load("data.csv")
    .measure(windows=[10, 60, 360])
    .baseline("ewma", alpha=0.1)
    .residual("z")
    .surfaces()
)

For branching and merging — multiple baselines, stacked features:

from signalforge.graph import Input, Measure, Baseline, Residual, Stack, Pipeline

x = Input()
m = Measure()(x)
bl = Baseline("ewma", alpha=0.1)(m)
r = Residual("z")(m, bl)
features = Stack()([m, r])
pipe = Pipeline(x, features)
result = pipe.run(records, windows=[10, 60, 360])

Custom aggregations

Each surface cell reduces a window to a number — by default a mean. SF ships with 20+ aggregations (mean, std, percentiles, spectral energy, dominant frequency, Shannon entropy, ...) and you can add your own:

from signalforge.pipeline.aggregation import register_aggregation

@register_aggregation("iqr")
def iqr(values):
    return float(np.percentile(values, 75) - np.percentile(values, 25))

Across domains

The same pipeline processes financial data, EEG brain recordings, satellite gravity measurements, and generic time series — unchanged.

EEG phase coherence

EEG seizure detection: the top panels show amplitude, the bottom panels show phase relationships between brain hemispheres. The seizure disrupts both — but the phase change is only visible with complex-valued analysis.

Documentation

Quick Start Zero to heatmap
Your Data Bring your own data
CLI All commands
Python API Chaining and DAG
Examples VIX, EEG, GRACE, INTERMAGNET
Concepts How it works
Comparison vs STFT, wavelets, EMD

License

Business Source License 1.1. See LICENSE.

Free for non-commercial use. Commercial use requires a license from Adelic — contact shun.honda@adelic.org. Converts to Apache 2.0 on 2029-03-22.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adelic_signalforge-0.4.0.tar.gz (14.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adelic_signalforge-0.4.0-py3-none-any.whl (96.9 kB view details)

Uploaded Python 3

File details

Details for the file adelic_signalforge-0.4.0.tar.gz.

File metadata

  • Download URL: adelic_signalforge-0.4.0.tar.gz
  • Upload date:
  • Size: 14.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for adelic_signalforge-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3447b98e1d85358f13d11f429073679e4c62f20031339fea54687ee655dafde8
MD5 f7092a2d87b92fdae05fd9f7944ef192
BLAKE2b-256 fc2dc26cc3606c7412a2363885bfc75755e6589188c4334da03a9466d5139a48

See more details on using hashes here.

File details

Details for the file adelic_signalforge-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for adelic_signalforge-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d7991b2cf0c09474b12efbedfe0acffa02f755815d1988c58b487b140151f9
MD5 49563ca30ebaad19b81cd3c3d035e2bd
BLAKE2b-256 2cba8ce21afc93c69b18fc9c03436a6dc5820e52ba56db9fae9ff997c840925e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page