{ "info": { "author": "Jasper Koops", "author_email": "jasperkoops91@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7" ], "description": "[![Build Status](https://travis-ci.org/Jasper-Koops/easy-gscv.svg?branch=master)](https://travis-ci.org/Jasper-Koops/easy-gscv)\n[![codecov](https://codecov.io/gh/Jasper-Koops/easy-gscv/branch/master/graph/badge.svg)](https://codecov.io/gh/Jasper-Koops/easy-gscv)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n\n## Easy Grid Search / Cross Validation\n\n*From data to score in 4 lines of code.*\n\nThis library allows you to quickly train machine learning classifiers by\nautomatically splitting the dataset and using both\n[grid search](https://en.wikipedia.org/wiki/Hyperparameter_optimization) and [cross validation](https://en.wikipedia.org/wiki/Cross-validation_(statistics)) in the training process. Users can either pass define the parameters themselves or let the **GSCV** object\nchoose them automatically (based on the classifier).\n\nThis library is an extension of the [scikit-learn](http://scikit-learn.org/stable/index.html) project.\n\n[View on pypi](https://pypi.org/project/easy-gscv/)\n\n\n### Example:\n\n```\nfrom sklearn.neural_network import MLPClassifier\nfrom sklearn import datasets\nfrom easy_gscv.classifiers import GSCV\n\n# Create test dataset\niris = datasets.load_iris()\nX = iris.data\ny = iris.target\nclf = MLPClassifier()\n\n# Create model instance\ngscv_model = GSCV(clf(), X, y)\n\n# Get score\ngscv_model.score()\n\n```\n\n\n## install\n\n*requires python 3.7+*\n\n```\npip install easy-gscv\n```\n\n\n## create\n\n```\nfrom easy_gscv.models import GSCV\nclf = LogisticRegression()\ngscv_model = GSCV(\n clf(), X, y, cv=15, n_jobs=-1, params={\n 'C': [10, 100],\n 'penalty': ['l2']\n }\n)\n```\n\nNo need to create separate train / test datasets, the model does this\nautomatically on initialization.\nIf no parameters are provided the grid search is performed on a default set.\nBut these can be overridden.\n\nThe number of folds to be used for cross validation can be specified\nby using the `cv` keyword.\nTo speed up the training process you can use the `n_jobs` parameter to\nset the number of cpu cores to use (or set it to `-1` to use all available.)\n\nThe model accepts either sklearn classifiers or string values.\nYou can get a list of valid classifiers by calling the 'classifiers' property. Passing string arguments to the GSCV object in turn saves\nyou from having to import sklearn classifiers yourself.\n\n```\ngscv_model = GSCV('RandomForestClassifier',, X, y)\ngscv_model.classifiers\n\n'KNeighborsClassifier',\n'RandomForestClassifier',\n'GradientBoostingClassifier',\n'MLPClassifier',\n'LogisticRegression',\n```\n\n\n## score\n\n```\ngscv_model.score()\n```\n\nThe grid search is performed on the training data. Use the `score` method to evaluate\nhow well the model can be generalized by scoring it against the test dataset.\n\n\n## get_best_estimator\n\n```\ngscv_model.get_best_estimator()\n```\n\nReturns the best scoring sklearn classifier (based on training data).\nAs its a valid scikit-learn classifier, you can use it do anything that\nyou could do with sklearn classifier.\n\nThe following classifiers are currently supported. With the eventual goal of\nsupporting all scikit-learn classifiers in the future.\n\n* KNeighborsClassifier\n* RandomForestClassifier\n* GradientBoostingClassifier\n* MLPClassifier\n* LogisticRegression\n\n\n## get_fit_details\n\nAs cross validation returns an average, it can be helpful to\nget a more detailed overview of the best scoring classifier.\n\nThis method returns a table like the one displayed below, which\nthen can be used to further refine the choice or parameters for\nsubsequent runs.\n\n```\nclf = KNeighborsClassifier()\ngscv_model = GSCV(clf(), X, y)\ngscv_model.get_fit_details()\n\n0.965 (+/-0.026) for {'weights': 'uniform', 'n_neighbors': 3}\n0.977 (+/-0.013) for {'weights': 'distance', 'n_neighbors': 3}\n0.979 (+/-0.011) for {'weights': 'uniform', 'n_neighbors': 5}\n0.979 (+/-0.011) for {'weights': 'distance', 'n_neighbors': 5}\n0.976 (+/-0.018) for {'weights': 'uniform', 'n_neighbors': 8}\n0.975 (+/-0.018) for {'weights': 'distance', 'n_neighbors': 8}\n0.971 (+/-0.022) for {'weights': 'uniform', 'n_neighbors': 12}\n0.973 (+/-0.024) for {'weights': 'distance', 'n_neighbors': 12}\n0.973 (+/-0.025) for {'weights': 'uniform', 'n_neighbors': 15}\n\n```\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/Jasper-Koops/easy-gscv", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "easy-gscv", "package_url": "https://pypi.org/project/easy-gscv/", "platform": "", "project_url": "https://pypi.org/project/easy-gscv/", "project_urls": { "Homepage": "https://github.com/Jasper-Koops/easy-gscv" }, "release_url": "https://pypi.org/project/easy-gscv/0.2/", "requires_dist": [ "numpy", "scipy", "scikit-learn" ], "requires_python": "", "summary": "A high level library gridsearch / cross evaluation library for scikit-learn", "version": "0.2" }, "last_serial": 4159812, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e5d652bce07397283a88ba5d9d56aa0b", "sha256": "d331a15accc8c9f2c6bb1c8c03111ae2172c87ff11525083f77f8aca9e1715ac" }, "downloads": -1, "filename": "easy_gscv-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e5d652bce07397283a88ba5d9d56aa0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8040, "upload_time": "2018-08-06T12:25:21", "url": "https://files.pythonhosted.org/packages/6a/85/39a9023e97d3b27241373a754be1af8e1b30ff8c888413a52498c07e2ef5/easy_gscv-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1c8892f930ad40c7abde6fd322cb369", "sha256": "1e97f0b6c19ab527b5a141a1c073d2168a321a7f954204c4b2d79ac3d0ca338b" }, "downloads": -1, "filename": "easy-gscv-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e1c8892f930ad40c7abde6fd322cb369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7029, "upload_time": "2018-08-06T12:25:22", "url": "https://files.pythonhosted.org/packages/ce/07/2f56e37e38702ec46064cc6620d6348a559fc1dcbd0b7ef86dd85cc07f8f/easy-gscv-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "eabebc613c390557e027ba2d92412b8f", "sha256": "67b0480f16129c830a11c3bdd090995f7353a239ed88254433a6c6aab49c1fcd" }, "downloads": -1, "filename": "easy_gscv-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "eabebc613c390557e027ba2d92412b8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8067, "upload_time": "2018-08-06T12:34:19", "url": "https://files.pythonhosted.org/packages/f0/d4/206b572fd2df0bad99b677ab14a79411b894b7162a5b1cf7c7502d6ae91d/easy_gscv-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ecebb04db0593be0f731e8907876c05", "sha256": "528205e0ba9f1a312eddbd236c55496b61bb3e5e32c354f54139601f8c620f51" }, "downloads": -1, "filename": "easy-gscv-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6ecebb04db0593be0f731e8907876c05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7068, "upload_time": "2018-08-06T12:34:20", "url": "https://files.pythonhosted.org/packages/c3/e0/89dbaeaafffe6d1bd9b355f5a30dbfb70ee85810910a1c66631cef3949fa/easy-gscv-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8f540460cdf83675fa4256d49483a54c", "sha256": "ffa3db7544bdd7510aac3844e6bd77e1e3b9af1f77193e625da55d23d6a1f28a" }, "downloads": -1, "filename": "easy_gscv-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8f540460cdf83675fa4256d49483a54c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8086, "upload_time": "2018-08-06T12:42:39", "url": "https://files.pythonhosted.org/packages/71/87/f2c2d59bed8dd6b55003591763f4cca8cfcf90359eee99fdb7d082cd1e16/easy_gscv-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d00ca832e111e2a8bc33684e484ed6de", "sha256": "ce3a5fc1a9789ecb17f394f4c500c1f1eb83fe6c64ef91890b4bdfd521aa58e6" }, "downloads": -1, "filename": "easy-gscv-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d00ca832e111e2a8bc33684e484ed6de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7071, "upload_time": "2018-08-06T12:42:40", "url": "https://files.pythonhosted.org/packages/bb/9b/6341159da937d08fd7eb2e026bd1aa6cbc7883c60e47be4866d1ac8d49d7/easy-gscv-0.1.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b5dc20a142213263a075565ef623e0ae", "sha256": "2fea237005252cce3621a2aa19e8dd5aebd63fa7af572d606904a4dea1f64e12" }, "downloads": -1, "filename": "easy_gscv-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b5dc20a142213263a075565ef623e0ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8587, "upload_time": "2018-08-11T15:14:44", "url": "https://files.pythonhosted.org/packages/69/d3/902c436f345fa188e2edc5f8670a91d5ed28c5cc9a7d748761505f88e92e/easy_gscv-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0019ce3718593c81cacbbecd25177ac", "sha256": "a891a245d833dcc50008481567fbded8de44ac620bbaf08d7101dddfe7d67bf9" }, "downloads": -1, "filename": "easy-gscv-0.2.tar.gz", "has_sig": false, "md5_digest": "e0019ce3718593c81cacbbecd25177ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7537, "upload_time": "2018-08-11T15:14:46", "url": "https://files.pythonhosted.org/packages/75/e1/cb1ed9642ca5803bfc563268d6ed3afbfbba240e92e476f4ac8a489643a8/easy-gscv-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b5dc20a142213263a075565ef623e0ae", "sha256": "2fea237005252cce3621a2aa19e8dd5aebd63fa7af572d606904a4dea1f64e12" }, "downloads": -1, "filename": "easy_gscv-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b5dc20a142213263a075565ef623e0ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8587, "upload_time": "2018-08-11T15:14:44", "url": "https://files.pythonhosted.org/packages/69/d3/902c436f345fa188e2edc5f8670a91d5ed28c5cc9a7d748761505f88e92e/easy_gscv-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0019ce3718593c81cacbbecd25177ac", "sha256": "a891a245d833dcc50008481567fbded8de44ac620bbaf08d7101dddfe7d67bf9" }, "downloads": -1, "filename": "easy-gscv-0.2.tar.gz", "has_sig": false, "md5_digest": "e0019ce3718593c81cacbbecd25177ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7537, "upload_time": "2018-08-11T15:14:46", "url": "https://files.pythonhosted.org/packages/75/e1/cb1ed9642ca5803bfc563268d6ed3afbfbba240e92e476f4ac8a489643a8/easy-gscv-0.2.tar.gz" } ] }