Skip to main content

'high-throughput spectrum peak modeling tools by using Spectrum adapted EM algorithms'

Project description

EMPeaks

This package is for high-throughput peak analysis by using Spectrum Adapted EM algorithm. Please refer the following paper when using this package: Sci. Tech. Adv. Mater. 20, 733-735 (2019).

version 1.0.0

In version 1.0.0, Gaussian Mixture Model (GMM) is only available.

Brief Explanation

class: GaussianMixture(data2d, K=2):

class for GMM object.
parameters:
_______________________________________
numpy_array data2d: [energy, intensity]
integer          K: number of Gaussians
_______________________________________

class SpectrumAdaptedEM(GaussianMixture)(data2d, K=2, max_iter=500):

Class for Spectrum Adapted EM algorithm opject.
parameters:
______________________________________________________
integer max_iter: max iteration for E-step and M-step.
______________________________________________________

def fit(iter_log=False, sampling=1):
    fitting GMM to the data2d via EM algorithm.
    parameters:
        boolean iter_log: switch to write the iteration log.
        integer sampling: sampling number for initial parameters. 
                          The largest likelihood model in samples is selected.

def plot_fitting_summary(self, dpi=100, save=False):

def plot_param_history(self, dpi=100, save=False):
    
def ani_gmm_history(self, dx=0.05, dpi=100, save=False, interval=100, repeat_delay=1500):

Examples

We prepared three examples to test this package.

  1. test_em(N: int)
    from EMPeaks import GaussianMixture
    test = GaussianMixture.Tests
    test.test_em(N=10000,sampling=5)
  1. test_spectrum_adapted_em(N: int)
from EMPeaks import GaussianMixture
test = GaussianMixture.Tests
test.test_spectrum_adapted_em(N=10000,sampling=5)
  1. test_exp_data()
from EMPeaks import GaussianMixture
test = GaussianMixture.Tests
test.test_exp_data('GFET0126_25V_C1s.txt', sampling=5)

© 2020-2021 National Institute of Advanced Industrial Science and Technology (AIST)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EMPeaks-1.0.1.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

EMPeaks-1.0.1-py3-none-any.whl (17.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page