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

Uploaded Python 3.9

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

Uploaded Python 3.8

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

Uploaded Python 3.7

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.3.2-py39-none-any.whl
Algorithm Hash digest
SHA256 63ac4c322c27fd15928e52a35fb6abcf047b12388ec5fdea5f4c502ec8ed7f1e
MD5 ad03cf45c4091a6c0387ac34cdf85a76
BLAKE2b-256 8f929a7429dba878167ee7546402a20ac17a42f6137f53b7293ac11a525578c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.3.2-py38-none-any.whl
Algorithm Hash digest
SHA256 6e2e7bb933fe5f371b368744bce20ccf80cd7e3d215166a01ebbd9f1ce60f1bd
MD5 8cda26c481ca7f6b888d30473de6e95e
BLAKE2b-256 a1939945c90ddd71fe66f834418288595b4d4a38e422c80805eb0688676e5c19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.3.2-py37-none-any.whl
Algorithm Hash digest
SHA256 a911508daee5483dd23ee876fdd05e6cd1dcb07c0c7f5a0e20b538fd6a2f3d15
MD5 9ea9b3878484b29436574707ff4142b8
BLAKE2b-256 d04dd91a4d612ea284ff25b4136f1c5d2534985170bfb80b0ccb5b491cb7572b

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