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

Uploaded Python 3.11

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

Uploaded Python 3.10

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

Uploaded Python 3.9

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.5.4-py311-none-any.whl
Algorithm Hash digest
SHA256 955d744b8d44bb4c55cf5983892c759cac2a37739ffa60c3192f7aed117bad11
MD5 dd42d753f3b36f21352fadd2b10b74e2
BLAKE2b-256 1c8b9fc26803403468008d558b9243b539bdde05bdc2cfbca75b28dcbdee1659

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.5.4-py310-none-any.whl
Algorithm Hash digest
SHA256 b2fefb321b964aa7cfdcae7806919f1d29cebdc47323117253ad11f52c0a3437
MD5 d3668065f43511a9f534de675575bf53
BLAKE2b-256 956001488f6400c7cb34e99cac533b69d8bb2c951269c9d70daf335bd5b7b280

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.5.4-py39-none-any.whl
Algorithm Hash digest
SHA256 1d0daf2e0dfc648b49bab7dc2f2b71e4f6607cca613ef09287a44ddb0ab9ebd0
MD5 2ee6deff2cd112d05446385e80c30ffd
BLAKE2b-256 4e8f153245241a0ee8c767ce70e072b2e4a923dcf428701a3ee73a8f4eb9b794

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