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.5.3-py311-none-any.whl (21.5 kB view details)

Uploaded Python 3.11

mixturemapping-0.5.3-py310-none-any.whl (21.5 kB view details)

Uploaded Python 3.10

mixturemapping-0.5.3-py39-none-any.whl (21.5 kB view details)

Uploaded Python 3.9

File details

Details for the file mixturemapping-0.5.3-py311-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping-0.5.3-py311-none-any.whl
Algorithm Hash digest
SHA256 4c8080ffe1286cb4a9b4ca2a871b7d7b75d097db10168e70e95a267414f80c45
MD5 dce813564dcdd0345570184497e8bcbb
BLAKE2b-256 fad968713bf86bb58744513104b07b1e737cd58edcbaf0bc9d94e7181d283a2e

See more details on using hashes here.

File details

Details for the file mixturemapping-0.5.3-py310-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping-0.5.3-py310-none-any.whl
Algorithm Hash digest
SHA256 2dacd6646e6adc2c8ca2b24aa373000d4c85d80117941987de5118485b46d9f2
MD5 c4a9d8b9ba73cd886618418613819b01
BLAKE2b-256 6784df08dde864b185dc9c5237fd73781905d57077419d2f0e67fd100dacdcd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.5.3-py39-none-any.whl
Algorithm Hash digest
SHA256 0ff150ed82883aef400696b9152ed66d3fb244b5d93b8bf03eb64ccba04309e1
MD5 2275396d9348362bd736b5e26f2b3930
BLAKE2b-256 9b61c55f2a1b77c86b048423c57563df98ad8cd133fe022aae2629bafdc14527

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