{"library":"scikit-learn-stubs","title":"scikit-learn-stubs","description":"Type stubs for scikit-learn, providing static type information for type checkers like mypy and pyright. Current version 0.0.3, updated 2025; low release cadence. Maintained by Microsoft via the python-type-stubs repository, forked by hoel-bagard.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install scikit-learn-stubs"],"cli":null},"imports":["from sklearn.linear_model import LogisticRegression"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from sklearn.linear_model import LogisticRegression\nimport numpy as np\n\n# Example usage with type hints (stubs enable type checking)\nmodel: LogisticRegression = LogisticRegression()\nX = np.array([[0, 0], [1, 1]])\ny = np.array([0, 1])\nmodel.fit(X, y)\nprint(model.predict([[0.5, 0.5]]))","lang":"python","description":"Basic scikit-learn usage with type stubs enabled. The stubs are automatically discovered by mypy/pyright when installed.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}