semvec/pypi-packages huggingface dataset:
circularcoordinates 0.1.1
Package contains tools used to create and plot circular coordinates from persistent cohomology
License: MIT
Keywords: python,cohomology,circular coordinates

# Circular-Coordinates
## _Circular coordinates from persistent cohomology_





Circular-Coordinates is an all in one class that facilitates creating and plotting circular coordinates from persistent cohomology functions hidden in your dataset.  

## Features

- takes input data in the form of numpy array or pandas dataframe
- utilizes the ripser library for fast persistent cohomology barcode calculation 
- Provides multiple ways of plotting and visualizing the output.

## Setup
You can install the library directly from github(will be published on Pypi soon). You will need PyQt5 before installing(only for visualizing plots in ide will be optional in future).

```
pip install PyQt5
pip install git+https://github.com/appliedtopology/circular-coordinates
```

## Example usage
Circular coordinates can be calculated and visualized with only a few lines of code. The circular coordinates are outputted mapped between [0,1]. When visualising the coordinates are denoted by colors on the color wheel (with its values mapped to [0,1]). Thus forming a loop stretching from 0 to 1.
```
import pandas as pd
import circularcoordinates

df = pd.read_csv('malaria.csv')
features = df[['Weight', 'Glucose', 'Accuri', 'RBC']]

prime=11
circ=circularcoordinates.circular_coordinate(prime)
vertex_values=circ.fit_transform(features)
circ.plot_pca(features,vertex_values)
```
![PCA PLOT](https://drive.google.com/uc?export=download&id=16BpwdQOkTnehwbRLc1SYpDiJ2Mmm_PaO)

If we already have the ripser output dictionary we can directly compute the circular coordinates without recomputing the dictionary.
```
ripser_output=circ.rips
vertex_values=circ.circular_coordinate(ripser_output)
```
We can also plot the persistant homology barcodes
```
circ.plot_barcode(circ.rips['dgms'][1])
```
![Barcode PLOT](https://drive.google.com/uc?export=download&id=1ARj-ta2Zk-pVN62l6_OjfzyMUouwTkDA)

Circular coordinates can also be plottted against external data to see what patterns emerge.
```
circ.plot_eps(df['Day Post Infection'],vertex_values)
```
![Barcode PLOT](https://drive.google.com/uc?export=download&id=1bzL3k6QmCYeSKyNetpHewsT8zbAqURpv)

## License

MIT
diffeqtorch 1.0.1
DifferentialEquations.jl with PyTorch.
License: MIT
Requires Python: >=3.6.0, <3.9

[![PyPI version](https://badge.fury.io/py/diffeqtorch.svg)](https://badge.fury.io/py/diffeqtorch)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/sbi-benchmark/diffeqtorch/blob/master/CONTRIBUTING.md)

# diffeqtorch

Bridges `DifferentialEquations.jl` with PyTorch. Besides benefitting from the huge range of solvers available in `DifferentialEquations.jl`, this allows taking gradients through solvers using [local sensitivity analysis/auto-diff](https://docs.sciml.ai/stable/analysis/sensitivity/). The package has only been tested with ODE problems, and in particular, automatic differentiation is only supported for ODEs using `ForwardDiff.jl`. This can be extended in the future, [contributions are welcome](https://github.com/sbi-benchmark/diffeqtorch/blob/master/CONTRIBUTING.md).


### Examples

- [Simple ODE problem to demonstrate the interface and confirm gradients with analytical solution](https://github.com/sbi-benchmark/diffeqtorch/blob/master/notebooks/01_simple_ode.ipynb)
- [SIR model for a slighlty more complicated model with numerical gradient checking](https://github.com/sbi-benchmark/diffeqtorch/blob/master/notebooks/02_sir_model.ipynb)
- [Hodgkin-Huxley model for a realistic example from Neuroscience](https://github.com/sbi-benchmark/diffeqtorch/blob/master/notebooks/03_hh_model.ipynb)


## Installation

Prerequisites for using `diffeqtorch` are installation of Julia and Python. Note that the binary directory of `julia` needs to be in your `PATH`.

Install `diffeqtorch`:
```commandline
$ pip install diffeqtorch
$ export JULIA_SYSIMAGE_DIFFEQTORCH="$HOME/.julia_sysimage_diffeqtorch.so"
$ python -c "from diffeqtorch.install import install_and_test; install_and_test()"
```

We recommend using a custom Julia system image containing dependencies. By setting the environment variable `JULIA_SYSIMAGE_DIFFEQTORCH`, an image will be created and used automatically. This may take a while but will improve speed afterwards.


## Usage

```python
from diffeqtorch import DiffEq

f = """
function f(du,u,p,t)
    du[1] = p[1] * u[1]
end
"""
de = DiffEq(f)

u0 = torch.tensor([1.])
tspan = torch.tensor([0., 3.])
p = torch.tensor([1.01])

u, t = de(u0, tspan, p)
```

See also `help(DiffEq)` and examples provided in `notebooks/`.


## License

MIT