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

Uploaded Python 3.9

mixturemapping-0.5.1-py38-none-any.whl (21.3 kB view details)

Uploaded Python 3.8

mixturemapping-0.5.1-py37-none-any.whl (21.3 kB view details)

Uploaded Python 3.7

File details

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

File metadata

  • Download URL: mixturemapping-0.5.1-py39-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for mixturemapping-0.5.1-py39-none-any.whl
Algorithm Hash digest
SHA256 920a3fe13b7a16d1606bdf2439c31b34e350c056f84b7c053a199e25c924805f
MD5 862918e28ee94b209ef3fe8012ba9b25
BLAKE2b-256 a487e64f2c4f16c8bb77ca604b71a40687ac0ce44e142a0057a43369584e0bd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mixturemapping-0.5.1-py38-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for mixturemapping-0.5.1-py38-none-any.whl
Algorithm Hash digest
SHA256 b0f047775a443c309740878a52d0362a7a58e023b1b96c5d82403da56f78fbc7
MD5 b18589bc81909d8469291e5dba0ad5ce
BLAKE2b-256 a7c54d70264f8e3fc5e8549f253d12af1e7b26f0f7f6e4f2f0d5a2e698abd722

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mixturemapping-0.5.1-py37-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3.7
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for mixturemapping-0.5.1-py37-none-any.whl
Algorithm Hash digest
SHA256 73b3fbdd744cba5c24914ccc2f72f6a5de459e22f5ac9356ff4b154acac4271e
MD5 1cb5cb0adece0f9eccc36d5c34d2668f
BLAKE2b-256 2ab770c901e9cce205c282f604f489a2249ac686671ed51f4907b0c366d2dc66

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