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

Uploaded Python 3.9

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

Uploaded Python 3.8

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

Uploaded Python 3.7

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.2.4-py39-none-any.whl
Algorithm Hash digest
SHA256 6b0e64e19d355dd9810e2009a055235456b21b76c0043b968a774ce440ac123a
MD5 b8d68bd1111788cd71621e4ccf376f12
BLAKE2b-256 dcae000c00e78fdc988d24bf7cf3a3f90f7e2e4785c3eb839fd2340d4942f5fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.2.4-py38-none-any.whl
Algorithm Hash digest
SHA256 dd39955165a91d3807c288f9b1efb1f0e6d85bee034f3186e14655dfc1f69c8c
MD5 0f88bad1e60f0d80fdbf0590dde7e23a
BLAKE2b-256 20ff032070e7dc275be42676f7181a523a9f1e22241ca8507e43c48c59894ccd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.2.4-py37-none-any.whl
Algorithm Hash digest
SHA256 90ccd7df0d0ee78b0ccb607edcaff0250b90bfe8acc4a43fb5fa0f2ae5478a4d
MD5 9f74b017fa333ee3600428edd04e3d20
BLAKE2b-256 68feb4189f648c3edbe16c414b3178cd917bac42f3d0ffd21e11127ea25ed4b9

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