No project description provided
Project description
MixtureMapping
Train Gaussian Mixture Mappings
Provides:
- Layers to build tensorflow models to map Gaussian mixtures
- 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
Release history Release notifications | RSS feed
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
File details
Details for the file mixturemapping-0.5.5-py311-none-any.whl
.
File metadata
- Download URL: mixturemapping-0.5.5-py311-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3.11
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bbdc6c5a8e369ea3e1163d36cca64fb45e52e02a3c0e78d80e9a5e7f453c0d5 |
|
MD5 | 691e5d8b23bce5bf029420571cd62315 |
|
BLAKE2b-256 | ab138a434f90f9dbd8b0375133eaa7bd9e5881698094866ff260059d432ea046 |
File details
Details for the file mixturemapping-0.5.5-py310-none-any.whl
.
File metadata
- Download URL: mixturemapping-0.5.5-py310-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 688f513978677fa5955cdc5cce11ca7db54b8617cc482d4fe0dc5de0f0d5d098 |
|
MD5 | a3d0cf6f97f9150137f0e21dffeb63a0 |
|
BLAKE2b-256 | 518b475061f4f429422f8692cb5bc153f4e6c01a9330e7eb1a011636de691caa |
File details
Details for the file mixturemapping-0.5.5-py39-none-any.whl
.
File metadata
- Download URL: mixturemapping-0.5.5-py39-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1b02a01fddc4591f43ca816b8f362b135f4c7d97e26ff7d6d9ead2e920e317b |
|
MD5 | 0b4044487817d243e4711c4f7ac84f0d |
|
BLAKE2b-256 | 47ef04a94fb920f81448eb030adaa93e3118523554d106743b461668062b6b9e |