{ "info": { "author": "Simon Frid", "author_email": "simon.frid@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: IPython", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Version Control" ], "description": ".. image:: https://travis-ci.org/fridiculous/estimators.svg?branch=master\n :target: https://travis-ci.org/fridiculous/estimators\n\n.. image:: https://landscape.io/github/fridiculous/estimators/master/landscape.svg?style=flat\n :target: https://landscape.io/github/fridiculous/estimators/master\n :alt: Code Health\n\nEstimators\n==========\n\nMachine Learning Versioning made Simple\n\n\nIntro\n-----\n\nEstimators helps organize, track machine learning models and datasets. Estimators functions as an api for your machine learning models and datasets, to convieniently persist, retrieve and machine learning models and datasets.\n\nThis repo utilizes sqlalchemy as an ORM. If you're using django, try `django-estimators `_ instead.\n\n\nInstallation\n------------\n\n\nEstimators is not yet on PyPI, so just run: ::\n\n pip install estimators\n\n\nEnvironment Setup\n-----------------\n\nFirst, we need to initialize our database and filesystem. This only needs to happen once per database/filesystem. In future releases, we anticipate this step will be simplified.\n::\n\n from estimators import Estimator, DataSet, DataBase\n db = DataBase()\n db.initialize_database()\n Estimator.initialize_root_dir()\n DataSet.initialize_root_dir()\n\n\nBasic Usage\n-----------\n\nWe can see the power of Estimators in 2 steps.\nLet's say we are developing a classifier. We'll load up the data, split it for validation, and then create and train a model.\n::\n\n from sklearn.datasets import load_digits\n from sklearn.ensemble import RandomForestClassifier\n\n digits = load_digits() # 1797 by 64\n X = digits.data\n y = digits.target\n\n # simple splitting for validation testing\n X_train, X_test = X[:1200], X[1200:]\n y_train, y_test = y[:1200], y[1200:]\n\n rfc = RandomForestClassifier()\n rfc.fit(X_train, y_train)\n\n\n1. First import an `Evaluator` object that instantiates an evaluation plan.\nSet the `estimator`, `X_test` and `y_test` to that evaluator object.\n::\n\n from estimators import Evaluator\n\n plan = Evaluator()\n plan.estimator = rfc\n plan.X_test = X_test\n plan.y_test = y_test\n\n # persist all objects upon prediction\n result = plan.evaluate()\n\n # including our predictions\n result.y_predicted\n\n\n2. At a later date, we can retrieve the results, along with the original estimator, X_test dataset and y_test dataset using sqlalchemy orm.\n::\n\n from estimators import DataBase, EvaluationResult\n db = DataBase()\n\n result = db.Session.query(EvaluationResult).first()\n\n # which has all our attributes\n result.id\n result.create_date\n result.estimator\n result.X_test\n result.y_test\n result.y_predicted\n\n\nAdvanced Usage\n--------------\n\nContinuing with the above example, we can pull specific estimators or datasets from our database.\n::\n\n from estimators import Estimator, DataSet\n\n # to return an estimator proxy object\n es = db.Session.query(Estimator)[-1]\n\n # return our fitted RandomForestClassifier\n es.estimator\n\n # to returns all datasets as proxy objects\n\n ds = db.Session.query(DataSet).all()\n ds[0].data\n\nBut we can continue on to use all of sqlalchemy's expressions\n::\n\n X_test_one = db.Session.query(DataSet).filter(DataSet.hash=='a381b220d0cd271d608a27eb52dfb654').first()\n y_test_one = db.Session.query(DataSet).filter(DataSet.hash=='fe773b5c53aec02fd98ffc65feb4714d').first()\n\n\nFurthermore, we can run more evaluations using our new proxy objects. The Evaluator\nobject handles the proxy Estimator and DataSet objects just like regular data.\n::\n\n plan = Evaluator()\n plan.estimator = es\n plan.X_test = X_test_one\n plan.y_test = y_test_one\n\n result_two = plan.evaluate()\n\n\nAdditionally if we want to use a different database connection, we can pass the sqlalchemy session object to the evaluator.\n::\n\n from estimators import DataBase\n db = DataBase(url='sqlite://')\n\n plan = Evaluator()\n plan.session = db.Session\n # and continue as expected otherwise\n\n\nDevelopment Installation\n------------------------\n\nTo install the latest version of estimators, clone the repo, change directory to the repo, and pip install it into your current virtual environment.::\n\n $ git clone git@github.com:fridiculous/estimators.git\n $ cd estimators\n $ \n (virtualenv) $ pip install -e . # the dot specifies for this current repo", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fridiculous/estimators", "keywords": "scikit-learn,machine learning,ml,estimators,version control", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "estimators", "package_url": "https://pypi.org/project/estimators/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/estimators/", "project_urls": { "Homepage": "https://github.com/fridiculous/estimators" }, "release_url": "https://pypi.org/project/estimators/0.1.0.dev0/", "requires_dist": [ "SQLAlchemy (==1.0.15)", "pympler (==0.4.3)" ], "requires_python": "", "summary": "Machine Learning Version Control made Simple", "version": "0.1.0.dev0" }, "last_serial": 2430845, "releases": { "0.1.0.dev0": [ { "comment_text": "", "digests": { "md5": "ae33424420f4bd3fe653d5080b962935", "sha256": "5a0c1b8e3ca24d3fab1f5a6fcf61434be6d65eecf1d1820c4eef64e096bde70f" }, "downloads": -1, "filename": "estimators-0.1.0.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ae33424420f4bd3fe653d5080b962935", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17611, "upload_time": "2016-10-29T20:38:51", "url": "https://files.pythonhosted.org/packages/05/6c/ee058363a0ca44c18eb3b71010cdd479be1beeedbe23ec2ecf11b97d266d/estimators-0.1.0.dev0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ae33424420f4bd3fe653d5080b962935", "sha256": "5a0c1b8e3ca24d3fab1f5a6fcf61434be6d65eecf1d1820c4eef64e096bde70f" }, "downloads": -1, "filename": "estimators-0.1.0.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ae33424420f4bd3fe653d5080b962935", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17611, "upload_time": "2016-10-29T20:38:51", "url": "https://files.pythonhosted.org/packages/05/6c/ee058363a0ca44c18eb3b71010cdd479be1beeedbe23ec2ecf11b97d266d/estimators-0.1.0.dev0-py2.py3-none-any.whl" } ] }