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.4.0-py39-none-any.whl (1.4 MB view details)

Uploaded Python 3.9

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

Uploaded Python 3.8

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

Uploaded Python 3.7

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.4.0-py39-none-any.whl
Algorithm Hash digest
SHA256 c3c83a67a77f59aa119053dc43b344c6a36f31dd237bb881b8727ea42bf5fefc
MD5 93347321df10eb6240a50235a85210ad
BLAKE2b-256 0c71b40e840ec5b4087e8231ec3a192b92200c26e901ac347c9d58ab0db6c0c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.4.0-py38-none-any.whl
Algorithm Hash digest
SHA256 796fad33c41d63b30d738eee605e723683607b409a4f483eab52c98c6537d76b
MD5 197aa4f0559857cb608cc75d05c4fc83
BLAKE2b-256 5626f6511347d83688f4621285fa59838f117819af7c574ebf9eec5bc5465a2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.4.0-py37-none-any.whl
Algorithm Hash digest
SHA256 7165e4d2a1cd5994ba4b8b9841023860991f70195450d71ac136b64d9f80b82e
MD5 e78e1f8aaefd8f7c906d77dbf666ea43
BLAKE2b-256 068e59cccd1c6a74019a569f8a4d95ca7b5f8e9daec32ce104310601eeb4bb10

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