{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", "Topic :: Software Development" ], "description": "[![Build Status](https://travis-ci.org/GitHub-HongweiZhang/prediction-flow.svg?branch=master)](https://travis-ci.org/GitHub-HongweiZhang/prediction-flow)\n\n[![PyPI version](https://badge.fury.io/py/prediction-flow.svg)](https://badge.fury.io/py/prediction-flow)\n\n# prediction-flow\n**prediction-flow** is a Python package providing modern **Deep-Learning**\nbased CTR models. Models are implemented by **PyTorch**.\n\n## how to use\n* Install using pip.\n```\npip install prediction-flow\n```\n\n## feature\n### how to define feature\nThere are two parameters for all feature types, name and column_flow.\nThe name parameter is used to index the column raw data from input data frame.\nThe column_flow parameter is a single transformer of a list of transformers.\nThe transformer is used to pre-process the column data before training the model.\n\n* dense number feature\n```\nNumber('age', StandardScaler())\nNumber('ctr', None)\n```\n* sparse category feature\n```\nCategory('movieId', CategoryEncoder(min_cnt=1))\n```\n* var length sequence feature\n```\nSequence('genres', SequenceEncoder(sep='|', min_cnt=1))\n```\n\n## transformer\nThe following transformers are provided now.\n\n| transformer | supported feature type | detail |\n|--|--|--|\n| StandardScaler | Number | Wrapper of scikit-learn's StandardScaler. Null value must be filled in advance. |\n| LogTransformer | Number | Log scaler. Null value must be filled in advance. |\n| CategoryEncoder | Category | Converting str value to int. Null value must be filled in advance using '\\_\\_UNKNOWN\\_\\_'. |\n| SequenceEncoder | Sequence | Converting sequence str value to int. Null value must be filled in advance using '\\_\\_UNKNOWN\\_\\_'. |\n\n## model\n\n| model | reference |\n|--|--|\n| DNN | - |\n| Wide & Deep | [DLRS 2016][Wide & Deep Learning for Recommender Systems](https://arxiv.org/pdf/1606.07792.pdf) |\n| DeepFM | [IJCAI 2017][DeepFM: A Factorization-Machine based Neural Network for CTR Prediction](http://www.ijcai.org/proceedings/2017/0239.pdf) |\n| DIN | [KDD 2018][Deep Interest Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1706.06978.pdf) |\n| DNN + GRU + GRU + Attention | [AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf) |\n| DNN + GRU + AIGRU | [AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf) |\n| DNN + GRU + AGRU | [AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf) |\n| DNN + GRU + AUGRU | [AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf) |\n| DIEN | [AAAI 2019][Deep Interest Evolution Network for Click-Through Rate Prediction](https://arxiv.org/pdf/1809.03672.pdf) |\n| OTHER | TODO |\n\n## example\n### movielens-1M \n**This dataset is just used to test the code can run, accuracy does not make\nsense.**\n* Prepare the dataset. [preprocess.ipynb](examples/movielens/ml-1m/preprocess.ipynb)\n* Run the model. [movielens-1m.ipynb](examples/movielens/movielens-1m.ipynb)\n\n### amazon\n* Prepare the dataset. [prepare_neg.ipynb](examples/amazon/prepare_neg.ipynb)\n* Run the model.\n [amazon.ipynb](examples/amazon/amazon.ipynb)\n* An example using [pytorch-lightning](https://github.com/williamFalcon/pytorch-lightning).\n [amazon-lightning.ipynb](examples/amazon/amazon-lightning.ipynb)\n\n**accuracy**\n\n![benchmark](examples/amazon/simple_benchmark.png)\n\n## acknowledge and reference\n* Referring the design from [DeepCTR](https://github.com/shenweichen/DeepCTR),\n the features are divided into dense (class Number), sparse (class Category),\n sequence (class Sequence) types.", "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/GitHub-HongweiZhang/prediction-flow", "keywords": "torch,ctr prediction,deep learning,deepfm,din,dnn,deep neural network", "license": "MIT", "maintainer": "Hongwei Zhang", "maintainer_email": "hw_zhang@outlook.com", "name": "prediction-flow", "package_url": "https://pypi.org/project/prediction-flow/", "platform": "", "project_url": "https://pypi.org/project/prediction-flow/", "project_urls": { "Homepage": "https://github.com/GitHub-HongweiZhang/prediction-flow" }, "release_url": "https://pypi.org/project/prediction-flow/0.1.5/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Deep-Learning based CTR models implemented by PyTorch", "version": "0.1.5", "yanked": false, "yanked_reason": null }, "last_serial": 9737448, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "43b15982f9ce8861fc9264a439a1dcc6", "sha256": "2bacba7be7f7d8c4085d7711b2325698c47b7ee3a20e386133f0a3021ebb8a8b" }, "downloads": -1, "filename": "prediction-flow-0.1.1.tar.gz", "has_sig": false, "md5_digest": "43b15982f9ce8861fc9264a439a1dcc6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25168, "upload_time": "2019-10-20T07:11:58", "upload_time_iso_8601": "2019-10-20T07:11:58.502994Z", "url": "https://files.pythonhosted.org/packages/b5/3f/d666b3ed6c94dd42f5ac037b030af45ab36ca1280f2214adb7e2a66ec0fd/prediction-flow-0.1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "dc87653d1e7699283733b8fa365195d0", "sha256": "18967fa916e46b001f8b3cd4eb799d2a1e0ec14ad4af23c8d26948a8d78eda97" }, "downloads": -1, "filename": "prediction-flow-0.1.2.tar.gz", "has_sig": false, "md5_digest": "dc87653d1e7699283733b8fa365195d0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25204, "upload_time": "2019-10-20T07:19:05", "upload_time_iso_8601": "2019-10-20T07:19:05.193604Z", "url": "https://files.pythonhosted.org/packages/90/a9/a41c6e9a0ab7ed1b7c13b8ffda48c691d5d111712632206daad67fcd474c/prediction-flow-0.1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "867e7efa697aed2c87bf36c4aab359c2", "sha256": "771d759ecf32cd104806e7b2f140d7421aba28d183b07cb12a67b9db7c1023e3" }, "downloads": -1, "filename": "prediction-flow-0.1.3.tar.gz", "has_sig": false, "md5_digest": "867e7efa697aed2c87bf36c4aab359c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25502, "upload_time": "2019-10-22T03:47:36", "upload_time_iso_8601": "2019-10-22T03:47:36.619576Z", "url": "https://files.pythonhosted.org/packages/fb/41/15b1c7b0feada12f085c263bd43ceeb000b2d18b7c74c9a5b6c5b526816f/prediction-flow-0.1.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "7ca71aeee43e66217c460862a8d78480", "sha256": "94dd3f95534130fe853534654bcfa58607fa471ef3016435c18b88c8c498ede6" }, "downloads": -1, "filename": "prediction-flow-0.1.4.tar.gz", "has_sig": false, "md5_digest": "7ca71aeee43e66217c460862a8d78480", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25701, "upload_time": "2020-06-22T07:43:14", "upload_time_iso_8601": "2020-06-22T07:43:14.505304Z", "url": "https://files.pythonhosted.org/packages/0e/cb/eb795fad3e3fdf5a3e1812842a288ff74317b80c0f092c15821ba1b0a0d0/prediction-flow-0.1.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "11563b58f25a1480a67511f8ae81dfe3", "sha256": "6304ea6238690672368e0315203c98eda3b3e4de9881c5ada1c267cd74f77cca" }, "downloads": -1, "filename": "prediction-flow-0.1.5.tar.gz", "has_sig": false, "md5_digest": "11563b58f25a1480a67511f8ae81dfe3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25753, "upload_time": "2021-03-11T06:08:55", "upload_time_iso_8601": "2021-03-11T06:08:55.188512Z", "url": "https://files.pythonhosted.org/packages/56/57/84002451f71c5ced1c442cee14145c3fdfa3479a142a6c31d2c1ec0f9fe4/prediction-flow-0.1.5.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "11563b58f25a1480a67511f8ae81dfe3", "sha256": "6304ea6238690672368e0315203c98eda3b3e4de9881c5ada1c267cd74f77cca" }, "downloads": -1, "filename": "prediction-flow-0.1.5.tar.gz", "has_sig": false, "md5_digest": "11563b58f25a1480a67511f8ae81dfe3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25753, "upload_time": "2021-03-11T06:08:55", "upload_time_iso_8601": "2021-03-11T06:08:55.188512Z", "url": "https://files.pythonhosted.org/packages/56/57/84002451f71c5ced1c442cee14145c3fdfa3479a142a6c31d2c1ec0f9fe4/prediction-flow-0.1.5.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }