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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file EMPeaks-1.0.1.tar.gz.

File metadata

  • Download URL: EMPeaks-1.0.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.6

File hashes

Hashes for EMPeaks-1.0.1.tar.gz
Algorithm Hash digest
SHA256 56fe18cfcdced1f2ee549ed04b4ba7efc17f7329ff76a3923b2e34983b19b48a
MD5 469c8e319962f34a3d34fd4b20f45e4d
BLAKE2b-256 e4c3bd300acc2348c6004a6b33f0196bb9ffde026275564970323b9f1f75c457

See more details on using hashes here.

File details

Details for the file EMPeaks-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: EMPeaks-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.6

File hashes

Hashes for EMPeaks-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8676db0be2444554ad4ef87ad365d932ee74433c3a98eec0b83cd2f0610a90e
MD5 ce6f5477e460845d7ffb1181db845793
BLAKE2b-256 177d3daf00e2070d2793b100227d717012b5617f4e7fca405d0c8b9cc2b8b908

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