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

Uploaded Python 3.9

mixturemapping-0.5.2-py38-none-any.whl (21.5 kB view details)

Uploaded Python 3.8

mixturemapping-0.5.2-py37-none-any.whl (21.5 kB view details)

Uploaded Python 3.7

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.5.2-py39-none-any.whl
Algorithm Hash digest
SHA256 541c1f976a57c608dddb08c164b279aabc0ad6e795eded3de0df93e301ed4c6b
MD5 e75140efe569b859f216283c3fd3e04d
BLAKE2b-256 8e6f306d52ae3b387877d5a393ff42e4d40317739fc3f05b53b1a0970cf659a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.5.2-py38-none-any.whl
Algorithm Hash digest
SHA256 995b2579dc19ebc5f18084e5393577f46aba0b06dd5239594012c851bbf09f2a
MD5 9528c932b0df5784ae31f16a3e3fc2e2
BLAKE2b-256 0394945607558fc5a50aac0d3432fbbba98f8e0bf0cc4d35290dbe7ef3f335dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mixturemapping-0.5.2-py37-none-any.whl
Algorithm Hash digest
SHA256 996cb1d89d5b40999f32002d3bbfab1f4f1cee28ad1db02a14e5c264a48b6a0f
MD5 cfb18a5595f60e2cdf0058fe8c518d54
BLAKE2b-256 39e2b14fb9b9c259393691983fa2ec182517e4b1d02ad708b262ac417f8eb847

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