Fast Averaged Shifted Histogram module.
Project description
FastASH
Fast Averaged Shifted Histograms.
Density estimation which approximate a triangular Kernel Density Estimation (KDE. Cython inside.
Getting Started
Example usage:
For a standard PDF
from scipy import stats
import numpy as np
from matplotlib import pyplot as plt
from fastash import ASH
n = 10**5
d = 3
mean = np.zeros(d)
cov = np.diag(np.ones(d))
X = stats.multivariate_normal.rvs(mean=mean, cov=cov, size=n)
ash = ASH(q=100)
ash.fit(X)
Y = np.zeros((300, d))
Y[:,0] = np.linspace(-4,4,300)
f = ash.predict(Y)
plt.plot(Y[:,0], stats.multivariate_normal.pdf(Y, mean=mean, cov=cov), label='exact')
plt.plot(Y[:,0], f, label='FastASH')
plt.legend()
plt.show()
## help for packaging
script files are provided and based on this tutorial :
https://levelup.gitconnected.com/how-to-deploy-a-cython-package-to-pypi-8217a6581f09
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastash-0.0.14.tar.gz
(69.6 kB
view hashes)
Built Distribution
Close
Hashes for fastash-0.0.14-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b60441fa0876f912b3ab875790e373b70d50570f34b3d000f8f792c159ad27d |
|
MD5 | fc4df286f81f30dae3f3e2092f62b44e |
|
BLAKE2b-256 | 75b6af9a4b8c02299bec2dd9b42dd2bc4820d5370d1e8dc96cb523c45fa27291 |