Skip to main content

No project description provided

Project description

MixtureMapping

Documentation PyPI version

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mixturemapping-0.2.0-py39-none-any.whl (1.4 MB view details)

Uploaded Python 3.9

mixturemapping-0.2.0-py38-none-any.whl (1.4 MB view details)

Uploaded Python 3.8

mixturemapping-0.2.0-py37-none-any.whl (1.4 MB view details)

Uploaded Python 3.7

File details

Details for the file mixturemapping-0.2.0-py39-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping-0.2.0-py39-none-any.whl
Algorithm Hash digest
SHA256 2b35e82f341ba2e18572aea550e0ff6532c1c59bd3c525542ca39c6b23342ca5
MD5 9d2a7624e87e39b6c5082dd6e150ec0d
BLAKE2b-256 91688e17e7d9fc1b16deede3e908ae23598ac75231f9961f5302a21fde29dc96

See more details on using hashes here.

File details

Details for the file mixturemapping-0.2.0-py38-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping-0.2.0-py38-none-any.whl
Algorithm Hash digest
SHA256 3f6502183c01b904fda814ab53b26a49e4e8fe0afdb095b6ac81994db06fa557
MD5 2f5d7067808527f8b1031cd0e2a645aa
BLAKE2b-256 5d5d63381b69daa5080137bbb94ebfc26ac4371763037f4b60b69adf53ca9ec5

See more details on using hashes here.

File details

Details for the file mixturemapping-0.2.0-py37-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping-0.2.0-py37-none-any.whl
Algorithm Hash digest
SHA256 40feb7d265f87439eb0ae33e69b79b4195c6ce3e0526a1346194df99c504d8ec
MD5 76e1516b8ee7c411c003c50869d8c772
BLAKE2b-256 34a256c8f9684b6e6881626b7001fb71b39d58b04da1e9e1bc5e041f76d49225

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page