semvec/pypi-packages huggingface dataset:
dbbpy 0.1.6
Python interface to recover a bound on ex ante dispersionof beliefs (DBB) from asset prices, based on Pazarbasi, Altan and Schneider, Paul Georg and Vilkov, Grigory, Dispersion of Beliefs Bounds: Sentimental Recovery (October 31, 2019). Swiss Finance Institute Research Paper No. 19-57, Management Science, forthcoming, Available at SSRN: https://ssrn.com/abstract=3478587 or http://dx.doi.org/10.2139/ssrn.3478587
Requires Python: <4.0,>=3.8

# DBBPY
DBBPY is a Python package replicating the method to recover a bound on ex-ante dispersion of beliefs from asset prices with minimal assumptions detailed in Pazarbasi, Altan and Schneider, Paul Georg and Vilkov, Grigory, Dispersion of Beliefs Bounds: Sentimental Recovery (October 31, 2019). Swiss Finance Institute Research Paper No. 19-57, Management Science, forthcoming, Available at SSRN: https://ssrn.com/abstract=3478587 or http://dx.doi.org/10.2139/ssrn.3478587. 

For more information, refer to the [documentation](https://pietro-zanottas-organization.gitbook.io/dbb).
torchclust 1.0.0
Scalable Implementations of clustering algorithms written in Pytorch for running on the GPU.
Requires Python: >=3.7
Keywords: machine learning deep learning pytorch clustering

![](./assets/logo.png)

# Torchclust: Clustering Algorithms written with Pytorch for running on GPU
![License](https://img.shields.io/github/license/hmunachi/nanodl?style=flat-square) [![LinkedIn](https://img.shields.io/badge/-LinkedIn-blue?style=flat-square&logo=linkedin&logoColor=white)](https://linkedin.com/in/daniel-ik-human) [![Twitter](https://img.shields.io/twitter/follow/1sn00s?style=social)](https://twitter.com/1sn00s)

Torchclust was developed to solve the issue of having to convert Pytorch Tensors to Numpy arrays and moving them to the CPU from the GPU in order to utilise frameworks such as scikit-learn.

Torchclust features implementations of common clustering algorithms with a scikit-learn feel.

## Implemented algorithms
- Centroid-based Clustering
    - KMeans
    - MeanShift
- Density-based Clustering
    - DBSCAN
    - Gaussian Mixture Model
- Deep / Learning-based Clustering
    - Self-Organising Maps
- Metrics
    - Internal
        - Silhouette Score
        - Interia
        - Davies-Bouldin Index 
        - Calinski-Harabasz Score / Variance Ratio Criterion
    - External
        - Purity Score
        - Rand Index
        - Adjusted Rand Index
        - Mutual Information
        - Normalised Mutual Information

## Contributing
This is still an ongoing project and contributions from the opensource community are warmly welcomed.

Contributions can be made in various forms:
- Writing docs / Updating README
- Fixings bugs
- More efficient implementations of algorithnms
- Or even implementing more algorithms

## Installation

*Be sure the GPU version of pytorch is installed if you intend to run the algorithms on GPU.*

```bash
pip install torchclust
```
## Usage

#### Kmeans on gaussian blobs
```python
import torch
import matplotlib.pyplot as plt

from torchclust.utils.datasets import make_blobs
from torchclust.centroid import KMeans

x, _ = make_blobs(1000, num_features=2, centers=3)
x = torch.from_numpy(x)

kmeans = KMeans(num_clusters=3)
labels = kmeans.fit_predict(x)

plt.scatter(x[:, 0], x[:, 1], c=labels)
plt.show()
```