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

Uploaded Python 3.9

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

Uploaded Python 3.8

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

Uploaded Python 3.7

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.1.3-py39-none-any.whl
Algorithm Hash digest
SHA256 88f4b29d4c8e9c4bdd3f9d0a02e6d92383730b5efd45b9adb4964580cbd87e8f
MD5 c8e56ca786f92a18c35d24c0261b34a9
BLAKE2b-256 f1ae60b9a0f0cc8c6bf008a9bf6b2d1d7fe26a3f806f41143aa97e8d710d779a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.1.3-py38-none-any.whl
Algorithm Hash digest
SHA256 681909011bfa05c4d1c74a43472d3f93f2ca61dc6c3e95a7786731c705efa8f4
MD5 ff2e82a77a9cc9fa73622ccb8b5f1f2a
BLAKE2b-256 6cd5769af434b469f11bb38c5dfc11502ef9a8cfa0bd34d30bd2f59b35067843

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.1.3-py37-none-any.whl
Algorithm Hash digest
SHA256 b2781977fc6f9ce037e0a0073dba77a8f36e1c4f588c3a06f0b9563019a9df40
MD5 9da2f75b4b51d2084d7b43d7edfd3a4e
BLAKE2b-256 1617f58ed9ad1eb7f5b09515228adb4c48703307b5238fe4faa251fe7d2ee118

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