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

mixturemapping_binning-0.5.5-py311-none-any.whl (36.2 kB view details)

Uploaded Python 3.11

mixturemapping_binning-0.5.5-py310-none-any.whl (36.2 kB view details)

Uploaded Python 3.10

mixturemapping_binning-0.5.5-py39-none-any.whl (36.2 kB view details)

Uploaded Python 3.9

File details

Details for the file mixturemapping_binning-0.5.5-py311-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping_binning-0.5.5-py311-none-any.whl
Algorithm Hash digest
SHA256 7a3b89d918e52d8aca32a1084f50318c7c0252b58a4a8834fa50d8086e2f7fa0
MD5 886488458b00125a1cb111ae8cd16974
BLAKE2b-256 2d3444d002e166fb3f3f1b6e7292eaad7175eb4e41cc16aefad8407f5259f01e

See more details on using hashes here.

File details

Details for the file mixturemapping_binning-0.5.5-py310-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping_binning-0.5.5-py310-none-any.whl
Algorithm Hash digest
SHA256 3339ce6c0e6da39151adfd3f5009d102a97fa71488fa9de3906a9ea33dbb4123
MD5 8d990942ee9a964def947e1370ee4882
BLAKE2b-256 c5cd52526ef5f21b043f10ef47578fec0a2a625784f38e8af9579d9b3fafcb4f

See more details on using hashes here.

File details

Details for the file mixturemapping_binning-0.5.5-py39-none-any.whl.

File metadata

File hashes

Hashes for mixturemapping_binning-0.5.5-py39-none-any.whl
Algorithm Hash digest
SHA256 8d40d3be8b0c862a058db431655802091eafa564708a1e8fc976037c290f112e
MD5 7a86e86e5cb9553170e8c5b8cbd6a7f0
BLAKE2b-256 8c4dee16a7af16e6e2374c6db4f7ac619ba7b59948ef9cffc96bff23e6a092ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page