https://github.com/rasmusml/nowcluster
A small clustering library
https://github.com/rasmusml/nowcluster
Last synced: 9 months ago
JSON representation
A small clustering library
- Host: GitHub
- URL: https://github.com/rasmusml/nowcluster
- Owner: RasmusML
- Created: 2021-02-19T18:01:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-21T17:06:16.000Z (about 5 years ago)
- Last Synced: 2023-11-21T22:31:06.534Z (over 2 years ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 1.77 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nowcluster
nowcluster is a small C clustering library with Python bindings.
## Usage
```
import numpy as np
from pynowcluster.clusters import FractalKMeans
n = 1_000_000
x = np.random.normal(0, 10, n)
y = np.random.normal(0, 5, n)
X = np.stack((x,y), axis=1)
X = X.astype(np.float32)
fkm = FractalKMeans().process(X)
print(fkm.clusters)
print(fkm.converged)
```
## Installation
### Windows
1. Update the path to vcvarsall.bat inside `win_startup.bat`
2. Run `win_startup.bat`
3. Run `win_build.bat`
4. Move the DLL into the appropriate pynowclusters folder based on target machine (x32/x64) and os (win).
### Linux
1. Run the makefile `make` located inside the folder "ccore" to create the shared library.
2. Move the shared library into the appropriate pynowclusters folder based on target machine (x32/x64) and os (linux).