Gaussian Mixtures 2

Overview

gmix2 is a reimplementation of gmix that provides functions for working with univariate Gaussian Mixture distributions similar to dmixnorm of the KScorrect R package. Unlike gmix, gmix2 does not include the code and recipes for implementing conditional density implementation using neural networks. This reduces the number of external dependencies and complexity of the project considerably (e.g., no need for TensorFlow). gmix2 is entirely written in C++ (and provides python bindings), so it is also slightly faster than gmix in most cases [1], and considerably faster in a a few cases. It also provides a few bug fixes and the plotting function has been improved.

[1]Most of the functions in gmix were written using numpy so it was already relatively efficient.

Dependencies

C++

  • A recent C++ compiler (gcc 9.3 is known to work)
  • CMake >= 3.16
  • Boost (>= 1.72.0) with python support
  • Python development libraries (for Python.h)
  • Eigen3

Python

Only python3 is supported.

Required

Needed For Plotting

  • scipy
  • pandas
  • plotnine
  • pycairo Matplotlib may complain if this is not installed separately.
  • PyQt5 You may need to install a rending package for interactive plots.

Install

Note, this package is only available as a source distribution. So, you must have a working C++ compiler and the required libraries listed above installed in a location visible to CMake.

From Git:

>pip install git+https://bitbucket.org/reidswanson/gmix2.git

Or on PyPI:

>pip install gmix2

Usage

See the Distribution Functions page or the API documentation for details on how to use the functions.

C++ Library

The base C++ code is also available as a header only library, but no additional documentation is provided for using it.

License

Any file without a specific copyright notification is released using the Apache v2 License by me (Reid Swanson). See the LICENSE file for more details.

Some code has been copied or adapted from the web (e.g., StackOverflow) that does not have clear license indications. In those cases the code is flagged with comments and links to where the code was found.