# Neptune + scikit-learn integration
Experiment tracking for scikit-learn–trained models.
## What will you get with this integration?
* Log, organize, visualize, and compare ML experiments in a single place
* Monitor model training live
* Version and query production-ready models and associated metadata (e.g., datasets)
* Collaborate with the team and across the organization
## What will be logged to Neptune?
* classifier and regressor parameters,
* pickled model,
* test predictions,
* test predictions probabilities,
* test scores,
* classifier and regressor visualizations, like confusion matrix, precision-recall chart, and feature importance chart,
* KMeans cluster labels and clustering visualizations,
* metadata including git summary info,
* [other metadata](https://docs.neptune.ai/logging/what_you_can_log)
![image](https://docs.neptune.ai/img/app/integrations/scikit-learn.png)
## Resources
* [Documentation](https://docs.neptune.ai/integrations/sklearn)
* [Code example on GitHub](https://github.com/neptune-ai/examples/blob/main/integrations-and-supported-tools/sklearn/scripts/Neptune_Scikit_learn_classification.py)
* [Runs logged in the Neptune app](https://app.neptune.ai/o/common/org/sklearn-integration/e/SKLEAR-95/all)
* [Run example in Google Colab](https://colab.research.google.com/github/neptune-ai/examples/blob/master/integrations-and-supported-tools/sklearn/notebooks/Neptune_Scikit_learn.ipynb)
## Example
```
# On the command line:
pip install neptune-sklearn
```
```python
# In Python, prepare a fitted estimator
parameters = {
"n_estimators": 70, "max_depth": 7, "min_samples_split": 3
}
estimator = ...
estimator.fit(X_train, y_train)
# Import Neptune and start a run
import neptune
run = neptune.init_run(
project="common/sklearn-integration",
api_token=neptune.ANONYMOUS_API_TOKEN,
)
# Log parameters and scores
run["parameters"] = parameters
y_pred = estimator.predict(X_test)
run["scores/max_error"] = max_error(y_test, y_pred)
run["scores/mean_absolute_error"] = mean_absolute_error(y_test, y_pred)
run["scores/r2_score"] = r2_score(y_test, y_pred)
# Stop the run
run.stop()
```
## Support
If you got stuck or simply want to talk to us, here are your options:
* Check our [FAQ page](https://docs.neptune.ai/getting_help)
* You can submit bug reports, feature requests, or contributions directly to the repository.
* Chat! When in the Neptune application click on the blue message icon in the bottom-right corner and send a message. A real person will talk to you ASAP (typically very ASAP),
* You can just shoot us an email at support@neptune.ai
Raw data
{
"_id": null,
"home_page": "https://neptune.ai/",
"name": "neptune-sklearn",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": null,
"keywords": "MLOps, ML Experiment Tracking, ML Model Registry, ML Model Store, ML Metadata Store",
"author": "neptune.ai",
"author_email": "contact@neptune.ai",
"download_url": "https://files.pythonhosted.org/packages/9b/a5/a7f5aa08f481ef03acd1cc296536a4f0cf1c14a8508c992d7dbb597665a7/neptune_sklearn-2.1.4.tar.gz",
"platform": null,
"description": "# Neptune + scikit-learn integration\n\nExperiment tracking for scikit-learn–trained models.\n\n## What will you get with this integration?\n\n* Log, organize, visualize, and compare ML experiments in a single place\n* Monitor model training live\n* Version and query production-ready models and associated metadata (e.g., datasets)\n* Collaborate with the team and across the organization\n\n## What will be logged to Neptune?\n\n* classifier and regressor parameters,\n* pickled model,\n* test predictions,\n* test predictions probabilities,\n* test scores,\n* classifier and regressor visualizations, like confusion matrix, precision-recall chart, and feature importance chart,\n* KMeans cluster labels and clustering visualizations,\n* metadata including git summary info,\n* [other metadata](https://docs.neptune.ai/logging/what_you_can_log)\n\n![image](https://docs.neptune.ai/img/app/integrations/scikit-learn.png)\n\n## Resources\n\n* [Documentation](https://docs.neptune.ai/integrations/sklearn)\n* [Code example on GitHub](https://github.com/neptune-ai/examples/blob/main/integrations-and-supported-tools/sklearn/scripts/Neptune_Scikit_learn_classification.py)\n* [Runs logged in the Neptune app](https://app.neptune.ai/o/common/org/sklearn-integration/e/SKLEAR-95/all)\n* [Run example in Google Colab](https://colab.research.google.com/github/neptune-ai/examples/blob/master/integrations-and-supported-tools/sklearn/notebooks/Neptune_Scikit_learn.ipynb)\n\n## Example\n\n```\n# On the command line:\npip install neptune-sklearn\n```\n\n```python\n# In Python, prepare a fitted estimator\nparameters = {\n \"n_estimators\": 70, \"max_depth\": 7, \"min_samples_split\": 3\n}\n\nestimator = ...\nestimator.fit(X_train, y_train)\n\n# Import Neptune and start a run\nimport neptune\n\nrun = neptune.init_run(\n project=\"common/sklearn-integration\",\n api_token=neptune.ANONYMOUS_API_TOKEN,\n)\n\n# Log parameters and scores\nrun[\"parameters\"] = parameters\n\ny_pred = estimator.predict(X_test)\n\nrun[\"scores/max_error\"] = max_error(y_test, y_pred)\nrun[\"scores/mean_absolute_error\"] = mean_absolute_error(y_test, y_pred)\nrun[\"scores/r2_score\"] = r2_score(y_test, y_pred)\n\n# Stop the run\nrun.stop()\n```\n\n## Support\n\nIf you got stuck or simply want to talk to us, here are your options:\n\n* Check our [FAQ page](https://docs.neptune.ai/getting_help)\n* You can submit bug reports, feature requests, or contributions directly to the repository.\n* Chat! When in the Neptune application click on the blue message icon in the bottom-right corner and send a message. A real person will talk to you ASAP (typically very ASAP),\n* You can just shoot us an email at support@neptune.ai\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Neptune.ai scikit-learn integration library",
"version": "2.1.4",
"project_urls": {
"Documentation": "https://docs.neptune.ai/integrations-and-supported-tools/model-training/sklearn",
"Homepage": "https://neptune.ai/",
"Repository": "https://github.com/neptune-ai/neptune-sklearn",
"Tracker": "https://github.com/neptune-ai/neptune-sklearn/issues"
},
"split_keywords": [
"mlops",
" ml experiment tracking",
" ml model registry",
" ml model store",
" ml metadata store"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8c63eb829b258168b99d5932353102be0be245a27ead2995c60933cc0b1d171e",
"md5": "d9c8f41a9a619aa01097700210eeb006",
"sha256": "f0fce972ecf38e801a51aa611b226d00f9a16f0b192c0382b1751d3bccb0ff3f"
},
"downloads": -1,
"filename": "neptune_sklearn-2.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d9c8f41a9a619aa01097700210eeb006",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 14957,
"upload_time": "2024-07-05T13:50:34",
"upload_time_iso_8601": "2024-07-05T13:50:34.527650Z",
"url": "https://files.pythonhosted.org/packages/8c/63/eb829b258168b99d5932353102be0be245a27ead2995c60933cc0b1d171e/neptune_sklearn-2.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9ba5a7f5aa08f481ef03acd1cc296536a4f0cf1c14a8508c992d7dbb597665a7",
"md5": "64802a7a768f856eab0e3fbd1ce7d619",
"sha256": "9687a4cc8349e5378766c48fe014ccaf955e155c40f9cc2fd38ebf0fd50a4fd7"
},
"downloads": -1,
"filename": "neptune_sklearn-2.1.4.tar.gz",
"has_sig": false,
"md5_digest": "64802a7a768f856eab0e3fbd1ce7d619",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 14596,
"upload_time": "2024-07-05T13:50:36",
"upload_time_iso_8601": "2024-07-05T13:50:36.182610Z",
"url": "https://files.pythonhosted.org/packages/9b/a5/a7f5aa08f481ef03acd1cc296536a4f0cf1c14a8508c992d7dbb597665a7/neptune_sklearn-2.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-05 13:50:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "neptune-ai",
"github_project": "neptune-sklearn",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "neptune-sklearn"
}