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

Uploaded Python 3.9

mixturemapping-0.5.0-py38-none-any.whl (21.1 kB view details)

Uploaded Python 3.8

mixturemapping-0.5.0-py37-none-any.whl (21.1 kB view details)

Uploaded Python 3.7

File details

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

File metadata

  • Download URL: mixturemapping-0.5.0-py39-none-any.whl
  • Upload date:
  • Size: 21.1 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.0-py39-none-any.whl
Algorithm Hash digest
SHA256 d570ca7f9ba91542f2b3a34eb8a4c9a3b1687d155334ec41ac5df87e1da2bb2c
MD5 110d1589f9dcb8d4fd9ab8b30afb3097
BLAKE2b-256 1a0a6cbcbae26d021b4cc66b43f5f79ffcdb87741524b42e793219bcbd81e507

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mixturemapping-0.5.0-py38-none-any.whl
  • Upload date:
  • Size: 21.1 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.0-py38-none-any.whl
Algorithm Hash digest
SHA256 de94eac5f78f1b95847d1304da05dcfbe756e9559f4b7018577b6e8dc459b2d3
MD5 8add6322a0877e2ffe202c340a5e543d
BLAKE2b-256 17921d535227208386ad4f7c2b3a5eac917c4def34b4e10381423828e04ea338

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mixturemapping-0.5.0-py37-none-any.whl
  • Upload date:
  • Size: 21.1 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.0-py37-none-any.whl
Algorithm Hash digest
SHA256 0743df67003479362a6fd24fe5b6f979a22572059974a5abe06241a447ba3dc8
MD5 bdebf00c5b9c4ed32f5e311f1f440e1a
BLAKE2b-256 ceb1d379e724564ca64e144715f504fe13498160587dc82f99fc43eaf49ef4dd

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