Metadata-Version: 2.4
Name: exact-clustering
Version: 0.1.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Summary: Find optimal clusterings and optimal hierarchical clusterings.
Keywords: clustering,k-means,k-median,optimization,algorithms
Author: lumi-a
License: MIT OR Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/lumi-a/py-exact-clustering

Low-effort way of calling the rust-crate [`exact-clustering`](https://github.com/lumi-a/exact-clustering) from Python. Consult [docs.rs](https://docs.rs/exact-clustering) for more extensive documentation.

```py
from exact_clustering import *

weighted_points = [
    (1.0, [0, 0]),
    (1.0, [1, 0]),
    (3.0, [0, 2]),
]

print(
    weighted_continuous_kmeans_price_of_hierarchy(
        weighted_points
    )
)
# 1.0
```

View provided methods via `help(exact_clustering)` in the python-repl or take a look at `/src/lib.rs`. At time of writing, they are:

```py
def unweighted_continuous_kmeans_price_of_hierarchy(points: list[tuple[float, list[float]]],) -> float: ...
def weighted_continuous_kmeans_price_of_hierarchy(weighted_points: list[list[float]],) -> float: ...
def unweighted_discrete_kmeans_price_of_hierarchy(points: list[tuple[float, list[float]]],) -> float: ...
def weighted_discrete_kmeans_price_of_hierarchy(weighted_points: list[list[float]],) -> float: ...
def unweighted_discrete_kmedian_price_of_hierarchy(points: list[tuple[float, list[float]]],) -> float: ...
def weighted_discrete_kmedian_price_of_hierarchy(weighted_points: list[list[float]],) -> float: ...
def unweighted_continuous_kmeans_price_of_greedy(points: list[tuple[float, list[float]]],) -> float: ...
def weighted_continuous_kmeans_price_of_greedy(weighted_points: list[list[float]],) -> float: ...
def unweighted_discrete_kmeans_price_of_greedy(points: list[tuple[float, list[float]]],) -> float: ...
def weighted_discrete_kmeans_price_of_greedy(weighted_points: list[list[float]],) -> float: ...
def unweighted_discrete_kmedian_price_of_greedy(points: list[tuple[float, list[float]]],) -> float: ...
def weighted_discrete_kmedian_price_of_greedy(weighted_points: list[list[float]],) -> float: ...
```
