scikit-dimension is a (work-in-progress /!\) Python module for intrinsic dimension estimation built according to the scikit-learn API and distributed under the 3-Clause BSD license.
Using pip:
pip install git+https://github.com/j-bac/scikit-dimension.git
From source:
git clone https://github.com/j-bac/scikit-dimension
cd scikit-dimension
pip install .
Local and global estimators can be used in this way:
import skdim
import numpy as np
#generate data : np.array (n_points x n_dim). Here a uniformly sampled 5-ball embedded in 10 dimensions
data = np.zeros((1000,10))
data[:,:5] = skdim.datasets.hyperBall(n = 1000, d = 5, radius = 1, random_state = 0)
#fit an estimator of global intrinsic dimension (gid)
danco = skdim.id.DANCo().fit(data)
#fit a global or local estimator in k-nearest-neighborhoods of each point:
lpca_pw = skdim.id.lPCA().fit_pw(data,
n_neighbors = 100,
n_jobs = 1)
#get estimated intrinsic dimension
print(danco.dimension_, fishers.dimension_, np.mean(lpca_pw))
Please refer to the documentation for detailed API and examples.
-
Kerstin Johnsson https://cran.r-project.org/web/packages/intrinsicDimension/index.html
-
Hideitsu Hino https://cran.r-project.org/web/packages/ider/index.html
- Gabriele Lombardi https://fr.mathworks.com/matlabcentral/fileexchange/40112-intrinsic-dimensionality-estimation-techniques
- Miloš Radovanović https://perun.pmf.uns.ac.rs/radovanovic/tle/
- Elena Facco https://github.com/efacco/TWO-NN
- Francesco Mottes https://github.com/fmottes/TWO-NN and my modified fork https://github.com/j-bac/TWO-NN