Metadata-Version: 2.4
Name: vaelchi
Version: 0.2.0
Summary: Python package for time-series analysis
Author-email: Rahul Kakodkar <cacodcar@gmail.com>
Maintainer-email: Rahul Kakodkar <cacodcar@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/cacodcar/vaelchi
Project-URL: Documentation, https://vaelchi.readthedocs.io/en/latest/index.html
Project-URL: Issues, https://github.com/cacodcar/vaelchi/issues
Keywords: representative days,modeling,energy systems,clustering
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: scikit-learn
Provides-Extra: test
Requires-Dist: coverage; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: hypothesis; extra == "test"
Requires-Dist: flake8; extra == "test"
Requires-Dist: radon; extra == "test"
Requires-Dist: ruff==0.16.9; extra == "test"
Requires-Dist: tox; extra == "test"
Provides-Extra: quality
Requires-Dist: radon; extra == "quality"
Requires-Dist: ruff==0.16.9; extra == "quality"
Requires-Dist: mypy; extra == "quality"
Requires-Dist: tox; extra == "quality"
Requires-Dist: build; extra == "quality"
Requires-Dist: setuptools; extra == "quality"
Requires-Dist: wheel; extra == "quality"
Requires-Dist: packaging; extra == "quality"
Requires-Dist: pandas-stubs==3.0.5.260914; extra == "quality"
Requires-Dist: scipy-stubs==1.18.1.1; extra == "quality"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-book-theme; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: sphinx_mdinclude; extra == "docs"
Requires-Dist: myst-nb; extra == "docs"
Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-togglebutton; extra == "docs"
Requires-Dist: sphinx-thebe; extra == "docs"
Requires-Dist: sphinx-design; extra == "docs"
Requires-Dist: sphinx-examples; extra == "docs"
Requires-Dist: sphinx-tabs; extra == "docs"
Requires-Dist: sphinxext-opengraph; extra == "docs"
Dynamic: license-file

![Vaelchi](https://raw.githubusercontent.com/cacodcar/vaelchi/main/docs/_static/vaelchi-logo-light.png)

# Vaelchi

Vaelchi is a **pre-alpha** Python package for time-series analysis, including
preprocessing, clustering, and representative periods. Its API may change in
later releases.

## Installation

Python 3.12 or newer is required.

```sh
python -m pip install vaelchi
```

## Features

- Cluster consecutive periods with adjacency-constrained agglomerative
  hierarchical clustering (AHC).
- Group nonadjacent periods with reproducible Euclidean k-means.
- Align unequal-length scalar sequences with exact absolute-cost DTW.
- Use shared clustering results while retaining `AHCResult` compatibility.
- Complete timestamped calendars and fill missing values using forward fill,
  backward fill, or time interpolation.
- Select observed representative profiles and retain their original units.
- Export profiles, chronological mappings, weights, and errors as plain data.

## Quick start

```python
from vaelchi import ahc

result = ahc(
    [10, 12, 10, 12, 20, 24, 20, 24],
    periods=2,
    period_length=2,
)
print(result.weights)  # [2 2]
payload = result.to_dict()
chronological_values = result.reconstruct()
```

Each positional input is one feature. Four two-timestep periods become two
representative periods. Profiles retain input units; weights count the original
periods assigned to each representative. The default, `nearest_centroid`,
selects an observed member of each cluster. Pass `selection="legacy"` to
reproduce the Vaelchi 0.1.0 default.

See the [repository and installation guide](https://github.com/cacodcar/vaelchi),
[examples](https://github.com/cacodcar/vaelchi/tree/main/docs/examples), and
[documentation](https://vaelchi.readthedocs.io/en/latest/index.html).
Report problems through [GitHub Issues](https://github.com/cacodcar/vaelchi/issues).

MIT license, copyright Rahul Kakodkar. Original author credits and numerical
validation records are retained.
