{ "info": { "author": "Deep Learn, Inc.", "author_email": "augerai@dplrn.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Build Tools" ], "description": "# Install\n```\npip install auger.ai.predict\n```\n\n# Auger.ai.predict\nAuger ML predict Python API and command line interface\n\n\n# Download exported model\n\nTo download exported model you can use:\n\n- Auger.ai web : https://app.auger.ai\n- auger.ai command line interface: https://pypi.org/project/auger.ai/\n\n# Predict using exported model\n\n- Unzip file with model\n- Run client.py from model folder:\n\npython /client.py --path_to_predict --model_path model_path\n\n--path_to_predict - path to file with data to predict. Should contain features used to train model\n--model_path - folder which contain model.pkl.gz file\n\nFor example:\n\npython ./models/export_9BB0BFA3D368454/client.py --path_to_predict ./files/baseball_predict.csv --model_path ./models/export_9BB0BFA3D368454/model\n\n## Client.py command line parameters\n\n --path_to_predict Path to file for predict\n\n --model_path Path to folder with model\n\n --threshold Threshold to use for predict_proba\n\n# Auger.ai.predict Python API\n## auger_ml.model_exporter.ModelExporter\nModelExporter provides interface to Auger predict API.\n\n- **ModelExporter(options)** - constructs ModelExporter instance.\n - options - optional parameters. Must be {} for now\n\n- **predict_by_model(model_path, path_to_predict=None, records=None, features=None, threshold=None)** - produce prediction based on exported model and data\n - model_path - folder which contain model.pkl.gz file\n - path_to_predict - data to predict\n - records - data to predict: list of lists. path_to_predict should be None in this case. For example: [[0.1,0.2],[0.1, 0.3]]\n - features - feature names for records. Used only when records is not None\n - threshold - set threshold to produce prediction for classification based on probabilities. proba_ column will be added to prediction result for each target class\n\n - RETURN: predictions - if path_to_predict is not None, then file in same directory with predcitions, or pandas dataframe\n\n Example:\n ```\n def predict_by_model_example(path_to_predict=None, threshold=None, model_path=None):\n #features is an array mapping your data to the feature, your feature and data should be\n #the same that you trained your model with.\n #If it is None, features read from model/options.json file\n #['feature1', 'feature2']\n features = None \n\n # data is an array of arrays to get predictions for, input your data below\n # each record should contain values for each feature\n records = [[],[]]\n\n if path_to_predict:\n path_to_predict=os.path.abspath(path_to_predict)\n\n predictions = ModelExporter({}).predict_by_model(\n records=records,\n model_path=model_path,\n path_to_predict=path_to_predict,\n features=features,\n threshold=threshold\n )\n\n return predictions\n ```\n\n- **load_model(model_path)** - load model from file.\n - model_path - folder which contain model.pkl.gz file\n\n - RETURN: model, timeseries_model\n - model - ML model to call predict \n - timeseries_model - flag is this timeseries model or not\n\n- **preprocess_data(model_path, data_path, records=None, features=None)** - preprocess data for predict. It will process data same way as train data used for model\n - model_path - folder which contain model.pkl.gz file\n - data_path - data to preprocess\n - records - data to predict: list of lists. data_path should be None in this case. For example: [[0.1,0.2],[0.1, 0.3]]\n - features - feature names for records. Used only when records is not None\n\n - RETURN: X_test, Y_test, target_categoricals\n - X_test - data to call predict \n - Y_test - array with target values\n - target_categoricals - dict with categories for target, may be used to get actual target values\n\n Example:\n ```\n def predict_by_model_example(path_to_predict=None, model_path=None):\n model_exporter = ModelExporter({})\n model, timeseries_model = model_exporter.load_model(model_path)\n X_test, Y_test, target_categoricals = model_exporter.preprocess_data(model_path, \n data_path=path_to_predict)\n\n results = model.predict(X_test)\n\n # If your target is categorical you can translate predicted values back to original:\n # target_feature = \"target\"\n # categories = target_categoricals[target_feature]['categories']\n # results = map(lambda x: categories[int(x)], results)\n ```\n\n Example for timeseries data:\n ```\n def predict_by_model_timeseries_example(path_to_predict=None, model_path=None):\n model_exporter = ModelExporter({})\n model, timeseries_model = model_exporter.load_model(model_path)\n X_test, Y_test, target_categoricals = model_exporter.preprocess_data(model_path, \n data_path=path_to_predict)\n\n if timeseries_model:\n results = model.predict((X_test, Y_test, False))[-1:]\n else:\n results = model.predict(X_test.iloc[-1:])\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/deeplearninc/auger-ai", "keywords": "augerai auger ai machine learning automl deeplearn api sdk prediction predict", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "auger.ai.predict", "package_url": "https://pypi.org/project/auger.ai.predict/", "platform": "any", "project_url": "https://pypi.org/project/auger.ai.predict/", "project_urls": { "Homepage": "https://github.com/deeplearninc/auger-ai" }, "release_url": "https://pypi.org/project/auger.ai.predict/1.0.17/", "requires_dist": [ "numpy (==1.17.0)", "scipy (==1.3.0)", "pandas (==0.23.4)", "scikit-learn", "xgboost", "catboost (==0.13.1)", "lightgbm", "joblib", "liac-arff", "stopit", "smart-open" ], "requires_python": ">=3", "summary": "Auger ML predict python and command line interface", "version": "1.0.17" }, "last_serial": 5871900, "releases": { "1.0.11": [ { "comment_text": "", "digests": { "md5": "60e8019ae14cd59c0e0b9326541088c2", "sha256": "9aa091959efabf254aea24a0a9f9d9b50be63230caa4b638b7850b7450fa22ba" }, "downloads": -1, "filename": "auger.ai.predict-1.0.11-py3-none-any.whl", "has_sig": false, "md5_digest": "60e8019ae14cd59c0e0b9326541088c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 96499, "upload_time": "2019-08-30T10:57:31", "url": "https://files.pythonhosted.org/packages/31/a5/ec796ec2512dd1f139d6ed119f47f559440cb6677f0203645e9d67a12d8d/auger.ai.predict-1.0.11-py3-none-any.whl" } ], "1.0.12": [ { "comment_text": "", "digests": { "md5": "a1f21f6ab71ea2f1b1b8679e024b4ac2", "sha256": "b8600958907d8b6a353c618c939c0238996815c281cc88c54cc39716eb91fb97" }, "downloads": -1, "filename": "auger.ai.predict-1.0.12-py3-none-any.whl", "has_sig": false, "md5_digest": "a1f21f6ab71ea2f1b1b8679e024b4ac2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 97363, "upload_time": "2019-09-18T07:17:51", "url": "https://files.pythonhosted.org/packages/4c/6c/81ace14ded698de2d8fd2d1463b4cb812b7ba7af6884f0605805143f59b5/auger.ai.predict-1.0.12-py3-none-any.whl" } ], "1.0.14": [ { "comment_text": "", "digests": { "md5": "a6b334794d0d68cc3842806db414fdc3", "sha256": "6faf0dd21684b710d18c1c9994f14e0844de39db44ad83cb55ca3f0c57ed8256" }, "downloads": -1, "filename": "auger.ai.predict-1.0.14-py3-none-any.whl", "has_sig": false, "md5_digest": "a6b334794d0d68cc3842806db414fdc3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 97429, "upload_time": "2019-09-18T09:08:04", "url": "https://files.pythonhosted.org/packages/f1/ea/da719123da58af7b4aa2e33a97f7b5d7ff179918ba76085a005124d6ee9d/auger.ai.predict-1.0.14-py3-none-any.whl" } ], "1.0.15": [ { "comment_text": "", "digests": { "md5": "159fdd4bd61d8e72c3e50c35d2c5ac70", "sha256": "6e318d836fa2a61a4ce8514b21d4738829baaf70e42b9003b9fa65485b9c3cd2" }, "downloads": -1, "filename": "auger.ai.predict-1.0.15-py3-none-any.whl", "has_sig": false, "md5_digest": "159fdd4bd61d8e72c3e50c35d2c5ac70", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 97539, "upload_time": "2019-09-18T20:31:15", "url": "https://files.pythonhosted.org/packages/aa/4d/1f442d2fa301f86fdb00062e1dfe008c9a85e0634c2fc29b55afbfa199c8/auger.ai.predict-1.0.15-py3-none-any.whl" } ], "1.0.17": [ { "comment_text": "", "digests": { "md5": "67b57bc83290ffdf08d485cb1699f617", "sha256": "f861877600bd6bf118e0fb3c39a06c61a6a1049046bcbce86c5bdd38ec9adab9" }, "downloads": -1, "filename": "auger.ai.predict-1.0.17-py3-none-any.whl", "has_sig": false, "md5_digest": "67b57bc83290ffdf08d485cb1699f617", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 98234, "upload_time": "2019-09-23T07:16:33", "url": "https://files.pythonhosted.org/packages/49/35/963e037603c3b2cf7bfe7b8ac2d9a98e8301f1cc58e0a128474b1f6c5182/auger.ai.predict-1.0.17-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "67b57bc83290ffdf08d485cb1699f617", "sha256": "f861877600bd6bf118e0fb3c39a06c61a6a1049046bcbce86c5bdd38ec9adab9" }, "downloads": -1, "filename": "auger.ai.predict-1.0.17-py3-none-any.whl", "has_sig": false, "md5_digest": "67b57bc83290ffdf08d485cb1699f617", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 98234, "upload_time": "2019-09-23T07:16:33", "url": "https://files.pythonhosted.org/packages/49/35/963e037603c3b2cf7bfe7b8ac2d9a98e8301f1cc58e0a128474b1f6c5182/auger.ai.predict-1.0.17-py3-none-any.whl" } ] }