mixturemapping


Namemixturemapping JSON
Version 0.5.4 PyPI version JSON
download
home_pagehttps://vk.github.io/mixturemapping-doc/
Summary
upload_time2024-01-09 16:30:10
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords tensorflow distributions gaussian mixtures
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MixtureMapping

[![Documentation](https://github.com/VK/dash-express-components/workflows/Publish%20release/badge.svg)](https://vk.github.io/mixturemapping-doc)
[![PyPI version](https://badge.fury.io/py/mixturemapping.svg)](https://badge.fury.io/py/mixturemapping)

Train Gaussian Mixture Mappings


## Provides:
  1. Layers to build tensorflow models to map Gaussian mixtures
  2. Tools to compute yield values of Gaussian mixtures in complex binning schemes

## Example
  
    import mixturemapping as mm  
    import tensorflow as tf

    inMeans = tf.keras.Input(shape=(mixN, inputMixM), name="Means", dtype=dataType)
    inStdDevs = tf.keras.Input(shape=(mixN, inputMixM), name="StdDevs", dtype=dataType)
    inWeight = tf.keras.Input(shape=(mixN), name="Weights", dtype=dataType)

    mapModel = tf.keras.Sequential()
    mapModel.add( tf.keras.layers.Dense(40, activation="relu", kernel_regularizer=regularizers.l2(0.001)) )
    mapModel.add( tf.keras.layers.Dense(40, activation="relu", kernel_regularizer=regularizers.l2(0.001)) )
    mapModel.add( tf.keras.layers.Dense(outputMixM))
    y = mapModel(inMeans)

    deltaModel = tf.keras.Sequential()
    deltaModel.add( tf.keras.layers.Dense(40, activation="relu", kernel_regularizer=regularizers.l2(0.001)) )
    deltaModel.add( tf.keras.layers.Dense(40, activation="relu", kernel_regularizer=regularizers.l2(0.001)) )
    deltaModel.add( tf.keras.layers.Dense(outputMixM))
    yDelta = deltaModel(inMeans)

    covALayer = mm.layers.TrainableCovMatrix(outputMixM, name="CovA")
    covA = covALayer(inMeans)

    mapLayer = mm.layers.GeneralMapping(outputMixM, name="Mapping", dtype=dataType)
    newDist = mapLayer({'means': inMeans, 'y':y, 'yDelta':yDelta, 'stdDevs': inStdDevs, 'weights': inWeight, 'covA': covA})

    distLayer = mm.layers.Distribution(dtype=dataType, regularize_cov_epsilon=0.95)
    dist = distLayer(newDist)

### Developement
```
$ py -m venv env
$ .\env\Scripts\activate
$ pip install -r requirements.txt
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://vk.github.io/mixturemapping-doc/",
    "name": "mixturemapping",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "tensorflow distributions gaussian mixtures",
    "author": "",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "# MixtureMapping\n\n[![Documentation](https://github.com/VK/dash-express-components/workflows/Publish%20release/badge.svg)](https://vk.github.io/mixturemapping-doc)\n[![PyPI version](https://badge.fury.io/py/mixturemapping.svg)](https://badge.fury.io/py/mixturemapping)\n\nTrain Gaussian Mixture Mappings\n\n\n## Provides:\n  1. Layers to build tensorflow models to map Gaussian mixtures\n  2. Tools to compute yield values of Gaussian mixtures in complex binning schemes\n\n## Example\n  \n    import mixturemapping as mm  \n    import tensorflow as tf\n\n    inMeans = tf.keras.Input(shape=(mixN, inputMixM), name=\"Means\", dtype=dataType)\n    inStdDevs = tf.keras.Input(shape=(mixN, inputMixM), name=\"StdDevs\", dtype=dataType)\n    inWeight = tf.keras.Input(shape=(mixN), name=\"Weights\", dtype=dataType)\n\n    mapModel = tf.keras.Sequential()\n    mapModel.add( tf.keras.layers.Dense(40, activation=\"relu\", kernel_regularizer=regularizers.l2(0.001)) )\n    mapModel.add( tf.keras.layers.Dense(40, activation=\"relu\", kernel_regularizer=regularizers.l2(0.001)) )\n    mapModel.add( tf.keras.layers.Dense(outputMixM))\n    y = mapModel(inMeans)\n\n    deltaModel = tf.keras.Sequential()\n    deltaModel.add( tf.keras.layers.Dense(40, activation=\"relu\", kernel_regularizer=regularizers.l2(0.001)) )\n    deltaModel.add( tf.keras.layers.Dense(40, activation=\"relu\", kernel_regularizer=regularizers.l2(0.001)) )\n    deltaModel.add( tf.keras.layers.Dense(outputMixM))\n    yDelta = deltaModel(inMeans)\n\n    covALayer = mm.layers.TrainableCovMatrix(outputMixM, name=\"CovA\")\n    covA = covALayer(inMeans)\n\n    mapLayer = mm.layers.GeneralMapping(outputMixM, name=\"Mapping\", dtype=dataType)\n    newDist = mapLayer({'means': inMeans, 'y':y, 'yDelta':yDelta, 'stdDevs': inStdDevs, 'weights': inWeight, 'covA': covA})\n\n    distLayer = mm.layers.Distribution(dtype=dataType, regularize_cov_epsilon=0.95)\n    dist = distLayer(newDist)\n\n### Developement\n```\n$ py -m venv env\n$ .\\env\\Scripts\\activate\n$ pip install -r requirements.txt\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "",
    "version": "0.5.4",
    "project_urls": {
        "Homepage": "https://vk.github.io/mixturemapping-doc/"
    },
    "split_keywords": [
        "tensorflow",
        "distributions",
        "gaussian",
        "mixtures"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "956001488f6400c7cb34e99cac533b69d8bb2c951269c9d70daf335bd5b7b280",
                "md5": "d3668065f43511a9f534de675575bf53",
                "sha256": "b2fefb321b964aa7cfdcae7806919f1d29cebdc47323117253ad11f52c0a3437"
            },
            "downloads": -1,
            "filename": "mixturemapping-0.5.4-py310-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3668065f43511a9f534de675575bf53",
            "packagetype": "bdist_wheel",
            "python_version": "py310",
            "requires_python": ">=3.7",
            "size": 21493,
            "upload_time": "2024-01-09T16:30:10",
            "upload_time_iso_8601": "2024-01-09T16:30:10.731941Z",
            "url": "https://files.pythonhosted.org/packages/95/60/01488f6400c7cb34e99cac533b69d8bb2c951269c9d70daf335bd5b7b280/mixturemapping-0.5.4-py310-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c8b9fc26803403468008d558b9243b539bdde05bdc2cfbca75b28dcbdee1659",
                "md5": "dd42d753f3b36f21352fadd2b10b74e2",
                "sha256": "955d744b8d44bb4c55cf5983892c759cac2a37739ffa60c3192f7aed117bad11"
            },
            "downloads": -1,
            "filename": "mixturemapping-0.5.4-py311-none-any.whl",
            "has_sig": false,
            "md5_digest": "dd42d753f3b36f21352fadd2b10b74e2",
            "packagetype": "bdist_wheel",
            "python_version": "py311",
            "requires_python": ">=3.7",
            "size": 21492,
            "upload_time": "2024-01-09T16:30:12",
            "upload_time_iso_8601": "2024-01-09T16:30:12.199488Z",
            "url": "https://files.pythonhosted.org/packages/1c/8b/9fc26803403468008d558b9243b539bdde05bdc2cfbca75b28dcbdee1659/mixturemapping-0.5.4-py311-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e8f153245241a0ee8c767ce70e072b2e4a923dcf428701a3ee73a8f4eb9b794",
                "md5": "2ee6deff2cd112d05446385e80c30ffd",
                "sha256": "1d0daf2e0dfc648b49bab7dc2f2b71e4f6607cca613ef09287a44ddb0ab9ebd0"
            },
            "downloads": -1,
            "filename": "mixturemapping-0.5.4-py39-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ee6deff2cd112d05446385e80c30ffd",
            "packagetype": "bdist_wheel",
            "python_version": "py39",
            "requires_python": ">=3.7",
            "size": 21522,
            "upload_time": "2024-01-09T16:30:13",
            "upload_time_iso_8601": "2024-01-09T16:30:13.261646Z",
            "url": "https://files.pythonhosted.org/packages/4e/8f/153245241a0ee8c767ce70e072b2e4a923dcf428701a3ee73a8f4eb9b794/mixturemapping-0.5.4-py39-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-09 16:30:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mixturemapping"
}
        
Elapsed time: 0.16865s