{ "info": { "author": "Mathieu Rodrigue", "author_email": "support@mlrequest.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Getting started\nmlrequest-python is a Python client for the [mlrequest](https://mlrequest.com) machine learning API. The client allows you to do a few significant things with only a few lines of code.\n\n* Deploy a latency-routed model to 5 data centers around the world, providing < 60ms global response time and automatic failover. No servers required.\n* Train a model with thousands of training examples per second\n* Get thousands of model predictions per second\n* Create online learning models (models that update incrementally, in real-time). Choose from classification, regression, and reinforcement learning model types.\n\nYou will need an API key to get started with mlrequest-python. You can obtain one for free that provides 10,000 model transactions at https://mlrequest.com/signup.html. The free plan is rate limited, for high throughput see our paid plans at https://mlrequest.com/pricing.html. Check out our [documentation](https://docs.mlrequest.com) for more information.\n\n## Install\n```\npip install mlrequest\n```\n## Create a Model\nModels are created automatically by calling one of the model endpoints below.\n\n## Classifier\n```python\nfrom mlrequest import Classifier\nclassifier = Classifier('your-api-key')\n\n# Learn single\ntraining_data = {features: {'feature1': 23.1, 'feature2': 'some-value'}, 'label': 1}\n# Learn batch\ntraining_data = [{features: {'feature1': 23.1, 'feature2': 'some-value'}, 'label': 1}, ...]\n\nr = classifier.learn(training_data=training_data, model_name='my-model', class_count=2)\nr.content # A single response or list of responses\n\n# Predict single\nfeatures = {'feature1': 23.1, 'feature2': 'some-value'}\n# Predict batch\nfeatures = [{'feature1': 23.1, 'feature2': 'some-value'}, ...]\n\nr = classifier.predict(features=features, model_name='my-model', class_count=2)\nr.predict_result # A single predicted class or a list of predicted classes\n```\n\n## Regression\n```python\nfrom mlrequest import Regression\nregression = Regression('your-api-key')\n\n# Learn single\ntraining_data = {features: {'feature1': 23.1, 'feature2': 'some-value'}, 'label': 1.25}\n# Learn batch\ntraining_data = [{features: {'feature1': 23.1, 'feature2': 'some-value'}, 'label': 1.25}, ...]\n\nr = regression.learn(training_data=training_data, model_name='my-model')\nr.content # A single response or list of responses\n\n# Predict single\nfeatures = {'feature1': 23.1, 'feature2': 'some-value'}\n# Predict batch\nfeatures = [{'feature1': 23.1, 'feature2': 'some-value'}, ...]\n\nr = regression.predict(features=features, model_name='my-model')\nr.predict_result # A single predicted value or a list of predicted values\n```\n\n## Reinforcement Learning\n```python\nfrom mlrequest import RL\nrl = RL('your-api-key')\n\n# Predict\n# Note: epsilon, and action_list fields are optional - see the docs at https://docs.mlrequest.com for more information\nfeatures = {'feature1': 23.1, 'feature2': 'some-value'}\n\nr = rl.predict(features=features, model_name='my-model', session_id='some-session-id', negative_reward=0, action_count=2)\nr.predict_result # A list of actions, ordered by rank (choose r.predict_data[0] for the best action)\n\n# Reward - important note: only the first action from predict_data should be rewarded. Other actions can be used but should not be rewarded.\nr = rl.reward(model_name=model_name, session_id='some_session', reward=1)\nr.content # A single response\n```\n\n## Account\n```python\n# Get account information\nr = account.get_details()\nr.content # Account info response\n\n# Delete a model\nr = account.delete_model(model_name='some-model')\nr.content # Delete success response\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/mlrequest/mlrequest-python", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "mlrequest", "package_url": "https://pypi.org/project/mlrequest/", "platform": "", "project_url": "https://pypi.org/project/mlrequest/", "project_urls": { "Homepage": "https://github.com/mlrequest/mlrequest-python" }, "release_url": "https://pypi.org/project/mlrequest/1.0.0/", "requires_dist": [ "requests-futures" ], "requires_python": ">=3.5", "summary": "Python client for the mlrequest machine learning API.", "version": "1.0.0" }, "last_serial": 6001698, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8a8ff46be511fa172e33ddca9a3a42d4", "sha256": "c992bdb488f5950ebfb08b89581ba7b304dcc40260b3b2dfae0c0894e1c101c3" }, "downloads": -1, "filename": "mlrequest-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8a8ff46be511fa172e33ddca9a3a42d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8134, "upload_time": "2019-10-20T02:40:08", "url": "https://files.pythonhosted.org/packages/2f/42/c62da2a9d9c713902b5dcc1240a77b09013dee1b19d2837e2ed0400ef645/mlrequest-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d453d6603024abd323a5a0b9944b1102", "sha256": "7f85bb54c6ad4d5d8c2ed480f76c563b88fecaf532d859c542b506b921ab6ba4" }, "downloads": -1, "filename": "mlrequest-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d453d6603024abd323a5a0b9944b1102", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4594, "upload_time": "2019-10-20T02:40:11", "url": "https://files.pythonhosted.org/packages/eb/19/ce0ba5ff99ae51a35ee09e84180765dbd84ceb833b58ef25298d0f7576f7/mlrequest-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8a8ff46be511fa172e33ddca9a3a42d4", "sha256": "c992bdb488f5950ebfb08b89581ba7b304dcc40260b3b2dfae0c0894e1c101c3" }, "downloads": -1, "filename": "mlrequest-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8a8ff46be511fa172e33ddca9a3a42d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8134, "upload_time": "2019-10-20T02:40:08", "url": "https://files.pythonhosted.org/packages/2f/42/c62da2a9d9c713902b5dcc1240a77b09013dee1b19d2837e2ed0400ef645/mlrequest-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d453d6603024abd323a5a0b9944b1102", "sha256": "7f85bb54c6ad4d5d8c2ed480f76c563b88fecaf532d859c542b506b921ab6ba4" }, "downloads": -1, "filename": "mlrequest-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d453d6603024abd323a5a0b9944b1102", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4594, "upload_time": "2019-10-20T02:40:11", "url": "https://files.pythonhosted.org/packages/eb/19/ce0ba5ff99ae51a35ee09e84180765dbd84ceb833b58ef25298d0f7576f7/mlrequest-1.0.0.tar.gz" } ] }