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-binning 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_binning-0.5.5-py311-none-any.whl | Python 3.11 | none | any | Details |
| mixturemapping_binning-0.5.5-py310-none-any.whl | Python 3.10 | none | any | Details |
| mixturemapping_binning-0.5.5-py39-none-any.whl | Python 3.9 | none | any | Details |
Total release size: 108.5 kB
Release files / mixturemapping_binning-0.5.5-py311-none-any.whl
| Download URL | mixturemapping_binning-0.5.5-py311-none-any.whl |
|---|---|
| Size | 36.2 kB |
| Tags | Python 3.11 |
|
SHA-256 checksum How to use checksums |
7a3b89d918e52d8aca32a1084f50318c7c0252b58a4a8834fa50d8086e2f7fa0
|
|
BLAKE2b-256 checksum How to use checksums |
2d3444d002e166fb3f3f1b6e7292eaad7175eb4e41cc16aefad8407f5259f01e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / mixturemapping_binning-0.5.5-py310-none-any.whl
| Download URL | mixturemapping_binning-0.5.5-py310-none-any.whl |
|---|---|
| Size | 36.2 kB |
| Tags | Python 3.10 |
|
SHA-256 checksum How to use checksums |
3339ce6c0e6da39151adfd3f5009d102a97fa71488fa9de3906a9ea33dbb4123
|
|
BLAKE2b-256 checksum How to use checksums |
c5cd52526ef5f21b043f10ef47578fec0a2a625784f38e8af9579d9b3fafcb4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / mixturemapping_binning-0.5.5-py39-none-any.whl
| Download URL | mixturemapping_binning-0.5.5-py39-none-any.whl |
|---|---|
| Size | 36.2 kB |
| Tags | Python 3.9 |
|
SHA-256 checksum How to use checksums |
8d40d3be8b0c862a058db431655802091eafa564708a1e8fc976037c290f112e
|
|
BLAKE2b-256 checksum How to use checksums |
8c4dee16a7af16e6e2374c6db4f7ac619ba7b59948ef9cffc96bff23e6a092ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|