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
Metadata
Release files for mixturemapping 0.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mixturemapping-0.5.5-py311-none-any.whl | Python 3.11 | none | any | Details |
| mixturemapping-0.5.5-py310-none-any.whl | Python 3.10 | none | any | Details |
| mixturemapping-0.5.5-py39-none-any.whl | Python 3.9 | none | any | Details |
Total release size: 64.5 kB
Release files / mixturemapping-0.5.5-py311-none-any.whl
| Download URL | mixturemapping-0.5.5-py311-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3.11 |
|
SHA-256 checksum How to use checksums |
9bbdc6c5a8e369ea3e1163d36cca64fb45e52e02a3c0e78d80e9a5e7f453c0d5
|
|
BLAKE2b-256 checksum How to use checksums |
ab138a434f90f9dbd8b0375133eaa7bd9e5881698094866ff260059d432ea046
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / mixturemapping-0.5.5-py310-none-any.whl
| Download URL | mixturemapping-0.5.5-py310-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3.10 |
|
SHA-256 checksum How to use checksums |
688f513978677fa5955cdc5cce11ca7db54b8617cc482d4fe0dc5de0f0d5d098
|
|
BLAKE2b-256 checksum How to use checksums |
518b475061f4f429422f8692cb5bc153f4e6c01a9330e7eb1a011636de691caa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / mixturemapping-0.5.5-py39-none-any.whl
| Download URL | mixturemapping-0.5.5-py39-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3.9 |
|
SHA-256 checksum How to use checksums |
e1b02a01fddc4591f43ca816b8f362b135f4c7d97e26ff7d6d9ead2e920e317b
|
|
BLAKE2b-256 checksum How to use checksums |
47ef04a94fb920f81448eb030adaa93e3118523554d106743b461668062b6b9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|