Geometric analysis engines for time series data
Project description
PRISM Engines
Geometric analysis engines for time series data.
Installation
pip install prism-engines
For plotting support:
pip install prism-engines[plot]
Quick Start
import prism_engines as prism
# Load CSV and run all engines
results = prism.run("your_data.csv")
# Print analysis report
results.print_report()
# Generate visualization
results.plot()
# Save results
results.save("output/", name="my_analysis")
What It Does
PRISM Engines analyzes multi-variate time series to reveal geometric structure:
| Engine | What It Measures |
|---|---|
| Correlation | Pairwise relationships between series |
| PCA | Dimensionality and dominant modes |
| Hurst | Memory/persistence in each series |
Example Output
============================================================
PRISM ENGINES ANALYSIS REPORT
============================================================
Data: (100, 5) (5 series)
Range: 2024-01-01 to 2024-04-10
--- CORRELATION ---
mean_abs_correlation: 0.4523
max_correlation: {'pair': ('AAPL', 'MSFT'), 'value': 0.892}
--- PCA ---
explained_variance_ratio: [0.523, 0.218, 0.142, 0.089, 0.028]
effective_dimension: 3
global_forcing_metric: 0.523
--- HURST ---
mean_hurst: 0.612
persistence_classification: {'AAPL': 'persistent', ...}
============================================================
Detailed Usage
Loading Data
from prism_engines import load_csv
# Load and validate CSV
df = load_csv("data.csv")
Your CSV should have:
- First column: dates (will become index)
- Remaining columns: numeric time series
Running Specific Engines
from prism_engines import run_engines
# Run only PCA and correlation
results = run_engines(df, engines=["pca", "correlation"])
Accessing Results
# Get specific engine result
pca = results["pca"]
# Access metrics
print(pca.metrics["global_forcing_metric"])
print(pca.metrics["effective_dimension"])
# Check all available metrics
print(pca.metrics.keys())
Available Engines
from prism_engines import list_engines
print(list_engines())
# ['correlation', 'pca', 'hurst']
Metrics Reference
Correlation Engine
correlation_matrix: NxN correlation matrixmean_abs_correlation: Average |correlation|max_correlation: Strongest correlated pairmin_correlation: Weakest correlated pair
PCA Engine
explained_variance_ratio: Variance per componenteffective_dimension: Components for 90% varianceglobal_forcing_metric: PC1 dominance (higher = more shared movement)pc1_loadings: How each series loads on PC1
Hurst Engine
hurst_exponents: H value per seriesmean_hurst: Average Hpersistence_classification: Category per seriesH < 0.4: anti-persistent (mean-reverting)0.4 ≤ H ≤ 0.6: random walkH > 0.6: persistent (trending)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prism_engines-0.1.0.tar.gz
(12.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prism_engines-0.1.0.tar.gz.
File metadata
- Download URL: prism_engines-0.1.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5a9527342fcdf23de19fe5b9b99dda24625640e564ff9c42cfa36fe81950c17
|
|
| MD5 |
54bfa4da48b10cdc4821fea4f40519b8
|
|
| BLAKE2b-256 |
33a37398eb6037b6e87dbdbd39b9e2541c01ca0c200e1efa1417de9899f21b61
|
File details
Details for the file prism_engines-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prism_engines-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e616643712a41fad62d0e8f572fcd932afb8416665cbf89dbd3f2dcaf0d28c03
|
|
| MD5 |
42fe21e463848ab4b8c6348c170330c3
|
|
| BLAKE2b-256 |
0db196bf58ff325805abe182979ee28ee1c64e8bd229ae8ba6049a8b1aa7dc4f
|