Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 0.7.4 (2025-07-04)

### Fix

- allow string input for expression parameter in U_stats_loop function
- improve formatting and readability of backend documentation in _backend.py
- update citation section in README.md to be commented out and adjust version reference format in pyproject.toml

## 0.7.3 (2025-07-04)

### Fix
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

This package provides a high-performance, tensor-based implementation for computing U-statistics and V-statistics with significant computational advantages:

- Leverages the underlying combinatorial structure of kernel functions to significantly reduce computational complexity from exponential to polynomial in many cases
- Leverages the underlying combinatorial structure of kernel functions to significantly reduce computational complexity in many cases
- Utilizes optimized einsum engines—[`numpy.einsum`](https://numpy.org/doc/stable/reference/generated/numpy.einsum.html) and [`torch.einsum`](https://pytorch.org/docs/stable/generated/torch.einsum.html)—to enable efficient computation on both CPU and GPU

## Table of Contents
Expand All @@ -28,6 +28,7 @@ Install the package from PyPI:
```bash
pip install u-stats
```

For development installation:

```bash
Expand Down Expand Up @@ -96,9 +97,9 @@ $$

The expression defines how kernel matrices are connected in the computation. We take this U-statistic as an example to explain how to construct expression.

to express the structure of the kernel function $h(x_1, x_2, \dots, x_7) = h_1(x_1, x_2) \cdot h_2(x_2, x_3) \cdots h_{6}(x_{6}, x_7)$, we assign a unique index to each distinct variable $x_1, x_2, \dots, x_7$. For each factor $h_k(x_{k}, x_{k+1})$, we collect the indices of the variables it depends on into a pair. The sequence of pairs is then ordered according to the order of the factors in the product.
To express the structure of the kernel function $h(x_1, x_2, \dots, x_7) = h_1(x_1, x_2) \cdot h_2(x_2, x_3) \cdots h_{6}(x_{6}, x_7)$, we assign a unique index to each distinct variable $x_1, x_2, \dots, x_7$. For each factor $h_k(x_{k}, x_{k+1})$, we collect the indices of the variables it depends on into a pair. The sequence of pairs is then ordered according to the order of the factors in the product.

We can using the following notation to represent this structure:
We can use the following notation to represent this structure:

**Einstein Summation Notation:**
```python
Expand All @@ -113,7 +114,7 @@ expression = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]]
**Format Explanation:**
- In Einstein notation: each letter represents an index, each string like `"ab"` represents a factor of the kernel
- In list notation: each sub-list `[i,j]` represents a factor of the kernel
Both formats are equivalent and specify the same computation pattern.
Both formats are equivalent and specify the same computation pattern in our package

#### 3.2.3 Complete Example

Expand Down Expand Up @@ -281,6 +282,5 @@ For questions or discussions, feel free to open an issue or reach out to the mai
url={https://github.com/Amedar-Asterisk/U-Statistics-python},
version={0.6.1},
year={2024}

}
``` -->
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "u-stats"
version = "0.7.3"
version = "0.7.4"
authors = [
{name = "Ruiqi Zhang", email = "zrq1706@outlook.com"}
]
Expand Down Expand Up @@ -106,7 +106,7 @@ ignore_missing_imports = true
name = "cz_conventional_commits"
tag_format = "$version"
version_scheme = "semver"
version = "0.7.3"
version = "0.7.4"
version_files = [
"pyproject.toml:version",
"src/u_stats/__init__.py:__version__",
Expand Down
2 changes: 1 addition & 1 deletion src/u_stats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""

__title__ = "u_stats"
__version__ = "0.7.3"
__version__ = "0.7.4"
__description__ = "A Python package for efficient computation of U-statistics via tensor contraction." # noqa: E501
__author__ = "Zhang Ruiqi"
__author_email__ = "zrq1706@outlook.com"
Expand Down