{ "info": { "author": "Lucio Anderlini", "author_email": "l.anderlini@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "# FastQuantileLayer\nFastQuantileLayer is a Layer for Keras implementing the QuantileTransform \nsimilarly to scikit-learn QuantileTransformer. \nA similar implementation, more precise but not bound to Keras, can be found here: \n https://github.com/yandexdataschool/QuantileTransformerTF/blob/master/README.md\n\nThe purpose of this package is:\n - remove all dependencies on scikit-learn\n - obtain an evaluation of the direct and inverse transform as fast as possible \n (trading some precision for performance)\n - obtain a TensorFlow graph runnable in a Sequential model in Keras \n\n\nThe package is composed of two classes:\n - *FixedBinInterpolator*: intended to interpolate a point-defined function\n y = f(x) with equidistant x samples (x-grid)\n - *FastQuantileLayer*: intended to compute the transform to preprocess\n the input data into a uniform- or normal-distributed variable. \n\n\n### Example outside Keras \n\n```\n ## Creates the training dataset \n dataset = np.random.uniform ( 0., 1., 1000 ) \n\n ## Train the QuantileTransformer \n transformer = FastQuantileLayer (output_distribution='normal')\n transformer . fit ( dataset ) \n\n ## Gets a new dataset with the same distribution as the training dataset\n test_dataset = tf.constant(np.random.uniform ( 0., 1., 100000 ))\n\n ## Transform the variable into a Gaussian-distributed variable t \n t = transformer . transform ( test_dataset ) \n\n [...] \n\n ## Appiles the inverted transform to the Gaussian distributed variable t \n bkwd = transformer . transform ( t, inverse=True ) \n\n ## bkwd differs from test_dataset only for computational errors \n ## (order 1e-5) that can be reduced tuning the arguments of QuantileTransformer\n```\n\n\n### Example within Keras \n\n```\n ## Creates the training dataset \n dataset = np.random.uniform ( 0., 1., 1000 ) \n\n model = tf.keras.models.Sequential()\n model.add ( FastQuantileLayer ( output_distribution = 'normal' ).fit ( dataset ) )\n model.add ( Dense ( 10, activation = 'tanh' ) )\n model.add ( Dense ( 1, activation = 'sigmoid' ) ) \n\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/landerli/FastQuantileLayer", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "FastQuantileLayer", "package_url": "https://pypi.org/project/FastQuantileLayer/", "platform": "", "project_url": "https://pypi.org/project/FastQuantileLayer/", "project_urls": { "Homepage": "https://github.com/landerli/FastQuantileLayer" }, "release_url": "https://pypi.org/project/FastQuantileLayer/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Keras Layer to apply Quantile transform and its inverse", "version": "0.2.1" }, "last_serial": 5349413, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "cfb2c36b712fc2e9be036ca2af1c804a", "sha256": "df20435f173f27ae16936a2e582e664bb4d3e29940e509b5cb7c7d73cda4f15a" }, "downloads": -1, "filename": "FastQuantileLayer-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "cfb2c36b712fc2e9be036ca2af1c804a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7481, "upload_time": "2019-05-31T17:20:49", "url": "https://files.pythonhosted.org/packages/8c/92/30f60f7f3a7a605ddebf1656392410495ff18935a4a27cbf5ef9a7029bd6/FastQuantileLayer-0.2-py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "723a9d98f3a17bbcceb9eb3e21b46930", "sha256": "51278f9f4b6f15ef4a87649a45437a4e7533c36b83f7d98d0516868b4719e333" }, "downloads": -1, "filename": "FastQuantileLayer-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "723a9d98f3a17bbcceb9eb3e21b46930", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10588, "upload_time": "2019-06-02T17:27:50", "url": "https://files.pythonhosted.org/packages/0f/0e/e4030e40c4571d68f85bef054d379911f2a8e6491325be1a02a2ec0964c4/FastQuantileLayer-0.2.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "723a9d98f3a17bbcceb9eb3e21b46930", "sha256": "51278f9f4b6f15ef4a87649a45437a4e7533c36b83f7d98d0516868b4719e333" }, "downloads": -1, "filename": "FastQuantileLayer-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "723a9d98f3a17bbcceb9eb3e21b46930", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10588, "upload_time": "2019-06-02T17:27:50", "url": "https://files.pythonhosted.org/packages/0f/0e/e4030e40c4571d68f85bef054d379911f2a8e6491325be1a02a2ec0964c4/FastQuantileLayer-0.2.1-py3-none-any.whl" } ] }