Registry / ai-ml / scikit-dimension

scikit-dimension

JSON →
library0.3.4pypypiunverified

scikit-dimension is a Python module for intrinsic dimension estimation built according to the scikit-learn API. It provides estimators for global and local intrinsic dimension, supporting methods like MLE, DANCo, kNN, and others. Current version 0.3.4 is released under the 3-Clause BSD license. Release cadence is irregular.

pip install scikit-dimension
INSTALL
IMPORT
SIG · SCIKIT-DIMENSION
S
scikit-dimension
ai-mlpythonv0.3.4
Install
13.2s avg
Import
Disk
465MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 13.2s · import 0.000s · 458MB
465MB installed
● package 465MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MLE
from skdim import MLE
from skdim.id import MLE

Basic usage of MLE estimator on random data.

from skdim.id import MLE import numpy as np # Generate synthetic data X = np.random.rand(100, 10) # Estimate intrinsic dimension mle = MLE() dim = mle.fit_transform(X) print('Estimated dimension:', dim)
Debug
Known issues
breakingIn v0.3, the `predict` method was changed to `transform`. Code using `predict` will break.
fix
Replace `.predict(X)` with `.transform(X)` or use `fit_transform(X)`.
affects: <0.3
gotchaThe kNN estimator class is named `kNN` (lowercase k), not `KNN`. Importing `KNN` raises ImportError.
fix
Use `from skdim.id import kNN`.
affects: all
gotchaSome estimators (eg MLE, DANCo) may return negative values if the data is not preprocessed. Intrinsic dimension must be non-negative.
fix
Ensure input data is scaled/normalized appropriately, and consider using the `denoising` parameter if available.
affects: all
deprecatedThe 'local' keyword argument in some estimators may be deprecated in future versions. Prefer using the dedicated `Local` or `Global` wrapper classes.
fix
Use `from skdim.local import ...` for local estimators, or check the documentation for the recommended API.
affects: >=0.3
Upgrade
Version history
0.3.4latest on PyPI · released Mar 11, 2024
Audit
Dependencies
scikit-learnrequiredcore dependency, API and estimator interface
numpyrequirednumerical computations
Agent activity
12 hits · last 30 days
node
8
OpenAI (training)
1
Resources
scikit-dimension — pip install scikit-dimension · libregistry