Metadata-Version: 2.4
Name: kappakit
Version: 0.1.0
Summary: Estimating the curvature of a manifold from data
Author: Jason Wang, Bobak Kiani, Melanie Weber
License: MIT License
        
        Copyright (c) 2025 Jason Wang, Bobak Kiani, Melanie Weber
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/Weber-GeoML/kappakit
Project-URL: Documentation, https://kappakit.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/Weber-GeoML/kappakit
Keywords: curvature,manifold,differential geometry,second fundamental form
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: jsonargparse>=4.35.0
Requires-Dist: jaxtyping>=0.2.36
Requires-Dist: wandb>=0.18.6
Requires-Dist: numpy>=1.25.2
Requires-Dist: scipy>=1.9.3
Requires-Dist: pandas>=2.2.1
Requires-Dist: scikit-learn>=1.4.1
Requires-Dist: torch>=2.2.0
Requires-Dist: pymanopt>=2.2.0
Requires-Dist: GraphRicciCurvature>=0.5.3.2
Requires-Dist: huggingface-hub>=0.22.1
Requires-Dist: transformers>=4.40.0
Requires-Dist: accelerate>=0.28.0
Requires-Dist: datasets>=2.18.0
Requires-Dist: diffusers>=0.27.2
Requires-Dist: matplotlib>=3.8.3
Requires-Dist: kaleido>=0.2.1
Requires-Dist: plotly>=5.20.0
Requires-Dist: dash>=2.18.2
Requires-Dist: pygwalker>=0.4.7
Requires-Dist: kneed>=0.8.5
Dynamic: license-file

<a href="https://kappakit.readthedocs.io/en/latest/"><img alt="Documentation" src="https://img.shields.io/website?url=https%3A%2F%2Fkappakit.readthedocs.io%2Fen%2Flatest%2F&up_message=sphinx&label=docs&color=blue"></a>
<a href="https://pypi.org/project/kappakit/"><img alt="Python version" src="https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FWeber-GeoML%2Fkappakit%2Frefs%2Fheads%2Fmain%2Fpyproject.toml&color=green"></a>
<a href="https://github.com/Weber-GeoML/kappakit/blob/main/LICENSE.txt"><img alt="Code license" src="https://img.shields.io/github/license/Weber-GeoML/kappakit?color=blue"></a>
<a href="https://github.com/Weber-GeoML/kappakit/releases"><img alt="GitHub release" src="https://img.shields.io/github/v/release/Weber-GeoML/kappakit?color=green"></a>

# KappaKit: Curvature Estimation on Data Manifolds with Diffusion-Augmented Sampling

`kappakit` is a Python library for estimating the curvature of a data manifold. 

Curvature is the fundamental descriptor of local geometry—useful in shape analysis, learning theory, and non-Euclidean algorithms—yet it proves elusive to estimate on sparse, noisy data.

KappaKit offers a modular base framework for various curvature estimation methods. In particular, it supports training diffusion models via the [HuggingFace](https://huggingface.co/) API to increase the sample density for downstream estimation methods.

## Installation

From pip:
```
pip install kappakit
```

From source:

```bash
git clone https://github.com/Weber-GeoML/kappakit.git
pip install -e .
```

## Usage

This repository contains the experiment scripts to reproduce the paper [Curvature Estimation on Data Manifolds with Diffusion-Augmented Sampling](https://openreview.net/pdf?id=zu24PDRqvB). If you use this repository, please use this paper as the citation.

You can reproduce the experiments by running `scripts/experiments/all.sh`. The figures in the paper were generated with `scripts/experiments/generate_figures.ipynb`.

A curvature estimation experiment may invoke the following routines in order:

1. `kappakit.routines.create_dataset`
2. `kappakit.routines.train_diffusion_model`
3. `kappakit.routines.estimate_curvature`

Please refer to the [documentation](https://kappakit.readthedocs.io/en/latest/) for the API reference as well as tutorials on how to use or expand this codebase.
