Skip to content

Commit

Permalink
sidebar & pip install
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumehu committed Aug 25, 2023
1 parent eece197 commit 2274f10
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

The Heat-Geodesic embedding preserves the heat-geodesic dissimilarity
defined as
defined as
```math
d_t(x_i,x_j) = \bigg[ -4t \log (\mathbf{H}_t)_{ij} - \sigma 4 t \log(\mathbf{V})_{ij} \bigg] ^{1/2},
```
Expand All @@ -26,29 +26,33 @@ Reduction](https://arxiv.org/abs/2305.19043).

## Install

The package is not yet available with pip or conda. To install it, you
can clone this repo and install from `setup.py`.
The package is available on PyPI, you can install it by running

``` sh
git clone https://github.com/KrishnaswamyLab/HeatGeo.git
cd HeatGeo
pip install -e .
pip install heatgeo
```

To reproduce the results in `experiments/` or try the embeddings with
different graph constructions, you need additional packages that can be
installed via the development version. In this case run

``` sh
cd HeatGeo
pip install -e '.[dev]'
pip install heatgeo['dev']
```

We provide an example below.

## How to use

Google colab example on the swiss roll [![Run in Google
To create the embedding of a dataset `data`, run

``` python
from heatgeo.embedding import HeatGeo
emb_op = HeatGeo(knn=5)
emb = emb_op.fit_transform(data)
```

We provide a Google colab example on the swiss roll [![Run in Google
Colab](https://img.shields.io/static/v1?label=Run%20in&message=Google%20Colab&color=orange&logo=Google%20Cloud.png)](https://colab.research.google.com/drive/1SkxGfWz8KLQpcea9MsdP7QEoe-yh5Iai?usp=sharing)

The directory `experiments` contains code to reproduce our main results.
Expand Down
19 changes: 12 additions & 7 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The package is not yet available with pip or conda. To install it, you can clone this repo and install from `setup.py`.\n",
"The package is available on PyPI, you can install it by running\n",
"```sh\n",
"git clone https://github.com/KrishnaswamyLab/HeatGeo.git\n",
"cd HeatGeo\n",
"pip install -e .\n",
"pip install heatgeo\n",
"```\n",
"To reproduce the results in `experiments/` or try the embeddings with different graph constructions, you need additional packages that can be installed via the development version. In this case run\n",
"```sh\n",
"cd HeatGeo\n",
"pip install -e '.[dev]'\n",
"pip install heatgeo['dev']\n",
"```\n",
"\n",
"We provide an example below."
]
},
Expand All @@ -63,7 +61,14 @@
"metadata": {},
"source": [
"## How to use\n",
"Google colab example on the swiss roll [![Run in Google Colab](https://img.shields.io/static/v1?label=Run%20in&message=Google%20Colab&color=orange&logo=Google%20Cloud)](https://colab.research.google.com/drive/1SkxGfWz8KLQpcea9MsdP7QEoe-yh5Iai?usp=sharing)\n",
"To create the embedding of a dataset `data`, run\n",
"```python\n",
"from heatgeo.embedding import HeatGeo\n",
"emb_op = HeatGeo(knn=5)\n",
"emb = emb_op.fit_transform(data)\n",
"```\n",
"\n",
"We provide a Google colab example on the swiss roll [![Run in Google Colab](https://img.shields.io/static/v1?label=Run%20in&message=Google%20Colab&color=orange&logo=Google%20Cloud)](https://colab.research.google.com/drive/1SkxGfWz8KLQpcea9MsdP7QEoe-yh5Iai?usp=sharing)\n",
"\n",
"The directory `experiments` contains code to reproduce our main results. We used `hydra`, the parameters can be changed in `config` or directly in the CLI. \n",
"In `notebooks`, we provide examples on toy datasets.\n"
Expand Down
14 changes: 7 additions & 7 deletions nbs/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ website:
sidebar:
contents:
- index.ipynb
- cheb.ipynb
- embedding.ipynb
- graph.ipynb
- heat_filter.ipynb
- mds.ipynb
- other_emb.ipynb
- utils.ipynb
- 00_embedding.ipynb
- 01_heat_filter.ipynb
- 02_cheb.ipynb
- 03_mds.ipynb
- 04_graph.ipynb
- 06_utils.ipynb
- 07_other_emb.ipynb

0 comments on commit 2274f10

Please sign in to comment.