{"id":24561,"library":"scikit-dimension","title":"scikit-dimension","description":"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.","status":"active","version":"0.3.4","language":"python","source_language":"en","source_url":"https://github.com/j-bac/scikit-dimension","tags":["intrinsic dimension","dimensionality estimation","manifold learning","scikit-learn"],"install":[{"cmd":"pip install scikit-dimension","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"core dependency, API and estimator interface","package":"scikit-learn","optional":false},{"reason":"numerical computations","package":"numpy","optional":false}],"imports":[{"note":"standard import","wrong":"","symbol":"MLE","correct":"from skdim.id import MLE"},{"note":"standard import","symbol":"DANCo","correct":"from skdim.id import DANCo"},{"note":"class name is lowercase 'kNN'","wrong":"from skdim.id import KNN","symbol":"KNN","correct":"from skdim.id import kNN"},{"note":"standard import","symbol":"TLE","correct":"from skdim.id import TLE"},{"note":"standard import","symbol":"EigValue","correct":"from skdim.id import EigValue"},{"note":"standard import","symbol":"FisherS","correct":"from skdim.id import FisherS"},{"note":"standard import","symbol":"CorrInt","correct":"from skdim.id import CorrInt"},{"note":"standard import","symbol":"LPCA","correct":"from skdim.id import LPCA"},{"note":"standard import","symbol":"MADA","correct":"from skdim.id import MADA"},{"note":"standard import","symbol":"MOM","correct":"from skdim.id import MOM"}],"quickstart":{"code":"from skdim.id import MLE\nimport numpy as np\n\n# Generate synthetic data\nX = np.random.rand(100, 10)\n\n# Estimate intrinsic dimension\nmle = MLE()\ndim = mle.fit_transform(X)\nprint('Estimated dimension:', dim)","lang":"python","description":"Basic usage of MLE estimator on random data."},"warnings":[{"fix":"Replace `.predict(X)` with `.transform(X)` or use `fit_transform(X)`.","message":"In v0.3, the `predict` method was changed to `transform`. Code using `predict` will break.","severity":"breaking","affected_versions":"<0.3"},{"fix":"Use `from skdim.id import kNN`.","message":"The kNN estimator class is named `kNN` (lowercase k), not `KNN`. Importing `KNN` raises ImportError.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure input data is scaled/normalized appropriately, and consider using the `denoising` parameter if available.","message":"Some estimators (eg MLE, DANCo) may return negative values if the data is not preprocessed. Intrinsic dimension must be non-negative.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from skdim.local import ...` for local estimators, or check the documentation for the recommended API.","message":"The 'local' keyword argument in some estimators may be deprecated in future versions. Prefer using the dedicated `Local` or `Global` wrapper classes.","severity":"deprecated","affected_versions":">=0.3"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from skdim.id import MLE`","cause":"Incorrect import path. The modules are under `skdim.id` not directly `skdim`.","error":"ImportError: cannot import name 'MLE' from 'skdim'"},{"fix":"Reshape your data: `X = X.reshape(-1, 1)` or `X = np.array(X).reshape(-1, ndim)`.","cause":"Passing a 1D array instead of 2D (samples x features).","error":"ValueError: Expected 2D array, got 1D array instead"},{"fix":"Call `fit_transform(X)` without y.","cause":"Passing both X and y to fit_transform, but the estimator only expects X.","error":"TypeError: fit_transform() takes 2 positional arguments but 3 were given"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}