{ "info": { "author": "sbarton272", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Visualization" ], "description": "[![CircleCI](https://circleci.com/gh/sbarton272/mlplot.svg?style=svg)](https://circleci.com/gh/sbarton272/mlplot)\n\n# mlplot\n\nMachine learning evaluation plots using [matplotlib](https://matplotlib.org/) and [sklearn](http://scikit-learn.org/).\n\n## Install\n\n```\npip install mlplot\n```\n\nML Plot runs with python 3.5 and above! (using format strings and type annotations)\n\n## Contributing\n\nCreate a PR!\n\n# Plots\n\nWork was inspired by [sklearn model evaluation](http://scikit-learn.org/stable/modules/evaluation.html).\n\n## Classification\n\n### ROC with AUC number\n\n```\nfrom mlplot.evaluation import ClassificationEvaluation\neval = ClassificationEvaluation(y_true, y_pred, class_names, model_name)\neval.roc_curve()\n```\n\nhttps://github.com/sbarton272/mlplot/blob/master/tests/output/tests.evaluation.test_classification.test_calibration.png?raw=true\n![ROC plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_classification.test_roc_curve.png)\n\n### Calibration\n\n```\nfrom mlplot.evaluation import ClassificationEvaluation\neval = ClassificationEvaluation(y_true, y_pred, class_names, model_name)\neval.calibration()\n```\n\n![calibration plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_classification.test_calibration.png)\n\n### Precision-Recall\n\n```\nfrom mlplot.evaluation import ClassificationEvaluation\neval = ClassificationEvaluation(y_true, y_pred, class_names, model_name)\neval.precision_recall(x_axis='recall')\neval.precision_recall(x_axis='thresold')\n```\n\n![precision recall curve plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_classification.test_precision_recall_regular.png)\n\n![precision recall threshold plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_classification.test_precision_recall_threshold.png)\n\n### Distribution\n\n```\nfrom mlplot.evaluation import ClassificationEvaluation\neval = ClassificationEvaluation(y_true, y_pred, class_names, model_name)\neval.distribution()\n```\n\n![distribution plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_classification.test_distribution.png)\n\n### Confusion Matrix\n\n```\nfrom mlplot.evaluation import ClassificationEvaluation\neval = ClassificationEvaluation(y_true, y_pred, class_names, model_name)\neval.confusion_matrix(threshold=0.5)\n```\n\n![confusion matrix](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_classification.test_confusion_matrix.png)\n\n### Classification Report\n\n```\nfrom mlplot.evaluation import ClassificationEvaluation\neval = ClassificationEvaluation(y_true, y_pred, class_names, model_name)\neval.report_table()\n```\n\n![classification report](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_classification.test_report_table.png)\n\n## Regression\n\n### Scatter Plot\n\n```\nfrom mlplot.evaluation import RegressionEvaluation\neval = RegressionEvaluation(y_true, y_pred, class_names, model_name)\neval.scatter()\n```\n\n![scatter plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_regression.test_scatter.png)\n\n### Residuals Plot\n\n```\nfrom mlplot.evaluation import RegressionEvaluation\neval = RegressionEvaluation(y_true, y_pred, class_names, model_name)\neval.residuals()\n```\n\n![scatter plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_regression.test_residuals.png)\n\n### Residuals Histogram\n\n```\nfrom mlplot.evaluation import RegressionEvaluation\neval = RegressionEvaluation(y_true, y_pred, class_names, model_name)\neval.residuals_histogram()\n```\n\n![scatter plot](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_regression.test_residuals_histogram.png)\n\n### Regression Report\n\n```\nfrom mlplot.evaluation import RegressionEvaluation\neval = RegressionEvaluation(y_true, y_pred, class_names, model_name)\neval.report_table()\n```\n\n![report table](https://raw.githubusercontent.com/sbarton272/mlplot/master/tests/output/tests.evaluation.test_regression.test_report_table.png)\n\n## Forecasts\n\n- TBD\n\n## Rankings\n\n- TBD\n\n# Development\n\n## Publish to pypi\n\n```\npython setup.py sdist bdist_wheel\ntwine upload --repository-url https://upload.pypi.org/legacy/ dist/*\n```\n\n## Design\n\nBasic interface thoughts\n```\nfrom mlplot.evaluation import ClassificationEvaluation\nfrom mlplot.evaluation import RegressorEvaluation\nfrom mlplot.evaluation import MultiClassificationEvaluation\nfrom mlplot.evaluation import MultiRegressorEvaluation\nfrom mlplot.evaluation import ModelComparison\nfrom mlplot.feature_evaluation import *\n\neval = ClassificationEvaluation(y_true, y_pred)\nax = eval.roc_curve()\nauc = eval.auc_score()\nf1_score = eval.f1_score()\nax = eval.confusion_matrix(threshold=0.7)\n```\n\n- ModelEvaluation base class\n- ClassificationEvaluation class\n - take in y_true, y_pred, class names, model_name\n- RegressorEvaluation class\n- MultiClassificationEvaluation class\n- ModelComparison\n - takes in two evaluations of the same type\n\n# TODO\n\n- Fix distribution plot, make lines\n- Add legend with R2 to regression plots\n- Add tests for regression comparison\n- Split apart files for comparison classes\n- Add comparisons to README\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sbarton272/mlplot", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "mlplot", "package_url": "https://pypi.org/project/mlplot/", "platform": "", "project_url": "https://pypi.org/project/mlplot/", "project_urls": { "Homepage": "https://github.com/sbarton272/mlplot" }, "release_url": "https://pypi.org/project/mlplot/0.0.3/", "requires_dist": [ "matplotlib (>=2.2.3)", "numpy (>=1.15.1)", "scipy (>=1.1.0)", "scikit-learn (>=0.19.2)" ], "requires_python": "", "summary": "", "version": "0.0.3" }, "last_serial": 5542068, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "de675847764ebe14a86f2b102317d13e", "sha256": "d454deb5b11ae3ff59ec12557c74137ff6b9ecd5a2c4de57b26890cc1f0191e6" }, "downloads": -1, "filename": "mlplot-0.0.0-py3.6.egg", "has_sig": false, "md5_digest": "de675847764ebe14a86f2b102317d13e", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 8476, "upload_time": "2018-09-19T16:37:39", "url": "https://files.pythonhosted.org/packages/c1/e1/ca1451c884b7841535897c3c97a7830f1d3a54fa93c2fdd64c183299d8d7/mlplot-0.0.0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "35f706b8e6aec3c2d307a7cc6ba2138e", "sha256": "19aeb0a21b54b1a0151570677eae96323a67f7437867117e5a8bf3f134977c16" }, "downloads": -1, "filename": "mlplot-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "35f706b8e6aec3c2d307a7cc6ba2138e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9634, "upload_time": "2018-09-19T16:37:37", "url": "https://files.pythonhosted.org/packages/17/90/04fdff2a4c5d97468fea58367282d35812f69fdfc136d8dbeb66b385041e/mlplot-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7a61c0b07a3ce281bba5db9911542f4", "sha256": "543daf433b184c53ee010d472c174c8c4739045012f517b74bff6a9fa69dbe9b" }, "downloads": -1, "filename": "mlplot-0.0.0.tar.gz", "has_sig": false, "md5_digest": "e7a61c0b07a3ce281bba5db9911542f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7853, "upload_time": "2018-09-19T16:37:40", "url": "https://files.pythonhosted.org/packages/bf/2f/f8ae8eea00904c4413117f711897c842d50f25f1dff2622f9399caf6fcf3/mlplot-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "ae32b15779236a1756cefb35f689f9ed", "sha256": "ab58489e770976e80d435b6fe901e7be7fe7c4498049d48689e0052bce1b7550" }, "downloads": -1, "filename": "mlplot-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ae32b15779236a1756cefb35f689f9ed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16312, "upload_time": "2019-05-31T05:29:38", "url": "https://files.pythonhosted.org/packages/64/55/3cf12372998e3336c8700dc97cc9335c6fce0b6065260b4e8598cc104649/mlplot-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef88a8177c62bbd4fa8431f937d7717c", "sha256": "e04305769702eba39c7a3d9f0719fd4c87f230100e88acf7c72a7b42ec43c464" }, "downloads": -1, "filename": "mlplot-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ef88a8177c62bbd4fa8431f937d7717c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7736, "upload_time": "2019-05-31T05:29:40", "url": "https://files.pythonhosted.org/packages/7b/90/36f7113eb360bbe5b757db1641a7bf1fb29852c12de5b9f791d2d706bc9c/mlplot-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4a186111c66e9694399337da7b2aa953", "sha256": "bcd137feb0883f6dd7b060890bc7d8f144c81b67adead937d26971e98fc9ad6d" }, "downloads": -1, "filename": "mlplot-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4a186111c66e9694399337da7b2aa953", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28510, "upload_time": "2019-07-16T18:30:16", "url": "https://files.pythonhosted.org/packages/6d/33/5309fda1c3c6be4173aaa965feab0c01669db8fc58c5cd18e69a737dbb7b/mlplot-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2a3f46eb8606433290d732ed471e4f1", "sha256": "2a77eaccb45ec0a9c7bc6ba0371368a2bbfff66f4515acf9059884b8a1a7b616" }, "downloads": -1, "filename": "mlplot-0.0.2.tar.gz", "has_sig": false, "md5_digest": "d2a3f46eb8606433290d732ed471e4f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11806, "upload_time": "2019-07-16T18:30:18", "url": "https://files.pythonhosted.org/packages/3c/e9/1f6afe7a4bb898719febd05a4b23ff96ce7bbd03a25cab382aa85bb5a371/mlplot-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "0179a1aca4439dc9c22be1c45c6ed67b", "sha256": "07a4439386a0a225b861b4eb936f304ee3be694c508dbddd3e681429c1c7bc9c" }, "downloads": -1, "filename": "mlplot-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0179a1aca4439dc9c22be1c45c6ed67b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28511, "upload_time": "2019-07-16T18:32:38", "url": "https://files.pythonhosted.org/packages/08/c6/65226d8c191f6915e97929928cf65f070c991e3ed1f5d88a03fe5de1c08c/mlplot-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee9b031ec684aa74b8d8e11c4e2a7eda", "sha256": "9d41f81168f03f3e9f25687fb4a0d345e1161d5379128289d4a04bcbad79044a" }, "downloads": -1, "filename": "mlplot-0.0.3.tar.gz", "has_sig": false, "md5_digest": "ee9b031ec684aa74b8d8e11c4e2a7eda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11811, "upload_time": "2019-07-16T18:32:40", "url": "https://files.pythonhosted.org/packages/da/ff/6315a7cd11ff4cb96a666ebcefe2701da7e9f4289427c5fe9decdf5b98c8/mlplot-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0179a1aca4439dc9c22be1c45c6ed67b", "sha256": "07a4439386a0a225b861b4eb936f304ee3be694c508dbddd3e681429c1c7bc9c" }, "downloads": -1, "filename": "mlplot-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0179a1aca4439dc9c22be1c45c6ed67b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28511, "upload_time": "2019-07-16T18:32:38", "url": "https://files.pythonhosted.org/packages/08/c6/65226d8c191f6915e97929928cf65f070c991e3ed1f5d88a03fe5de1c08c/mlplot-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee9b031ec684aa74b8d8e11c4e2a7eda", "sha256": "9d41f81168f03f3e9f25687fb4a0d345e1161d5379128289d4a04bcbad79044a" }, "downloads": -1, "filename": "mlplot-0.0.3.tar.gz", "has_sig": false, "md5_digest": "ee9b031ec684aa74b8d8e11c4e2a7eda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11811, "upload_time": "2019-07-16T18:32:40", "url": "https://files.pythonhosted.org/packages/da/ff/6315a7cd11ff4cb96a666ebcefe2701da7e9f4289427c5fe9decdf5b98c8/mlplot-0.0.3.tar.gz" } ] }