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

Uploaded Python 3.9

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

Uploaded Python 3.8

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

Uploaded Python 3.7

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.2.1-py39-none-any.whl
Algorithm Hash digest
SHA256 e16fdc6e52d5418c8ecb2462163c64a2fbc51fb758f28826cf1d75c68d79c565
MD5 c9ae056c4ac58afda12b99af4ebc6fa8
BLAKE2b-256 245d0f50fc35c8bf5d73eb11a669d2eb6dc956c9bbe02ab35eb9efe5d479961c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.2.1-py38-none-any.whl
Algorithm Hash digest
SHA256 e10d690fba1ebb56d5c80e1dad153ebfe30270bc6481bc862c0f1a2cf247383b
MD5 4b61c0097090067f9f5bde273b2dc4cb
BLAKE2b-256 2b5ef3a2db852dc5c5904bb6e90c5a4bcc9e3446f4d40d46a310accbb6e5e067

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.2.1-py37-none-any.whl
Algorithm Hash digest
SHA256 d0a76a89dab82a2a18954e086e57d983d82473b8bd5a84316f1fa8cf1ecb04e9
MD5 e8fc3b7617ceb728336154e250b39ea0
BLAKE2b-256 11165c5eadc74610425b493bd9bd480fc8e5ad90dacb97ad0c218a0419d3b8b5

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