semvec/pypi-packages huggingface dataset:
tsdr 0.1
Time-series dimension reduction
Requires Python: >=3.8

<h1 align="center"><em>tsdr</em>: Time-Series Dimension Reduction</h1>

<p align="center">
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" height="20"/></a>
 	  <a href="https://twitter.com/compTimeSeries"><img src="https://img.shields.io/twitter/url/https/twitter.com/compTimeSeries.svg?style=social&label=Follow%20%40compTimeSeries" height="20"/></a>
</p>


<p align="center"><img src="img/tsdr_categories.png" height="300"/></p>

## About

Time-series dimension reduction (TSDR) methods are a class of algorithms for the dimension reduction of multivariate data that exploit temporal structure. As compared to general dimension reduction (GDR) methods, the outputs of which are invariant to temporal permutation, TSDR methods are sensitive to temporal structure.

The figure above visually summarises the categories of TSDR methods that we defined in Owens & Fulcher (2025). The first five categories (a-e) consist of methods that extract time-series components based on different aspects of temporal structure, i.e., slowness, autocorrelation, predictability, determinism, and non-stationarity. The final two categories (f-g) consist of methods that share a common methodology, i.e., diffusion-based and latente variable methods.

The <em>tsdr</em> package provides python implementations of TSDR methods from each of these seven categories. The methods are written in a simple, readable style to enable time-series analysts to better understand a subset of the TSDR methods discussed in the Owens & Fulcher (2025) review paper.

### Acknowledgement :

If you use this software, please read and cite this open-access article:

- &#x1F4D7; Owens & Fulcher [Time-series dimension reduction: a comprehensive review and conceptual unification of algorithms](url), _arXiv_ (In Preparation).


## Installation

Using `pip` for [`tsdr`](https://pypi.org/project/tsdr/):

```
pip install tsdr
```

## Usage

```python
from tsdr.slowness import SFA

import numpy as np
import scipy
import matplotlib.pyplot as plt

# create a dataset for analysis
# a sinusoid
z = np.sin(np.linspace(0, 4*np.pi, 1000))
# multichannel noise
D = 10
noise = np.random.normal(scale=1.0, size=((len(z), D-1)))
# linear mixing
A = scipy.stats.ortho_group.rvs(D, random_state=1)
X = np.concatenate([z.reshape(-1,1), noise], axis=1) @ A

# extract a slow component using SFA
slow_component = SFA(n_components=1).fit_transform(X)

# visualise the component
fig, axs = plt.subplots(6, 1, figsize=(8, 8))
axs[0].plot(slow_component, lw=1.0)
axs[0].set_ylabel('SFA1')
for i in range(D):
    axs[i].spines[['right', 'top', 'bottom']].set_visible(False)
    axs[i].set_xticks([])
    axs[i+1].plot(X[:, i], c='black', linewidth=0.5)
    axs[i+1].set_ylabel(f'X{i+1}')
axs[D].spines[['right', 'top']].set_visible(False)
axs[D].set_xlabel('Time')
plt.tight_layout()

```

<p align="center"><img src="img/sfa_example.png" height="600"/></p>

<!-- ## Usage notes
-
-
-->
python-doxx 0.1.0
Python bindings for the Rust doxx document converter
Requires Python: >=3.8
Keywords: docx, conversion, markdown, python-binding, doxx

# python-doxx

Minimal Python bindings for the [`doxx`](https://github.com/bgreenwell/doxx) Rust library. Exposes just the pieces needed for scripted document inspection:

- `convert(path, export_format="markdown", page=None, images=False)` — export `.docx` files as Markdown, plain text, JSON, CSV, or ANSI strings. Optional `page` isolates a single page (1-indexed); set `images=True` to retain image references when available.
- `search(path, query, page=None)` — return match locations for quick content checks, mirroring `doxx --search`.
- `extract_images(path, output_dir)` — dump embedded images, similar to `--extract-images` in the CLI.

## Installation

Once the tagged `v0.1.0` release has propagated to PyPI:

```bash
pip install python-doxx
# or
uv pip install python-doxx
```

To build from source locally:

```bash
maturin develop
```

## Usage

```python
import doxx

# Export to Markdown
markdown = doxx.convert("report.docx", export_format="markdown", images=True)

# Pull a single page as CSV
csv_page = doxx.convert("data.docx", export_format="csv", page=2)

# Locate text snippets
hits = doxx.search("contract.docx", "payment")
for hit in hits:
    print(hit.page, hit.text)

# Extract embedded images
saved = doxx.extract_images("slides.docx", "./images")
```

Supported export formats: `markdown`, `text`, `json`, `csv`, and `ansi`.

Images are optional; enable them when you need real file paths in the exported Markdown or ANSI render. CSV export raises `ValueError` if the document contains no tables.

## Releasing

1. Make sure `CHANGELOG.md` (if present) and `pyproject.toml` share the new version.
2. Tag the release (`git tag v0.1.0`), then `git push --tags`.
3. The GitHub Actions workflow builds wheels for macOS, Linux, and Windows, uploads them as artifacts, and—when `PYPI_API_TOKEN` is configured in the repository secrets—publishes to PyPI automatically.