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

Uploaded Python 3.9

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

Uploaded Python 3.8

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

Uploaded Python 3.7

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.1.2-py39-none-any.whl
Algorithm Hash digest
SHA256 a3bb66265cf130903743a950bae1b476d8823d055d7d78408df330f587d9f688
MD5 52fed4c8a1fb075269c1baaa07e77d2b
BLAKE2b-256 82d70707b83f66f345c669cf40922e23fb35bc6ef0c0ea5b94a746a36d83caa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.1.2-py38-none-any.whl
Algorithm Hash digest
SHA256 02d0fdd1baecc6fd4a0e7aa62b6d3540e1b9b8098e27a741e03982a9d46956b4
MD5 16ee70c8fc76b2859dbebeffb30ccd14
BLAKE2b-256 d4f83aecd116b772b9adfdee0af24a5e00442903d736549c6e29846c397cf95c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.1.2-py37-none-any.whl
Algorithm Hash digest
SHA256 b08b51d37550b3581e7ba58bc5085c45bc6bccd912f7efc6f3d01abf619d93e1
MD5 ac6da47293974e86e7817b4af113de7b
BLAKE2b-256 575605c5bd94d465202f5fe9cce4c86847e88c700c4873fb086890e21cc666cd

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