Gaussian Mixture Model clustering in size-and-shape space
Project description
GMM Positions
Overview
This is a package to perform Gaussian Mixture Model (GMM) clustering on particle positions (in ). Like other GMM schemes, the user must specify the number of clusters and a cluster initialization scheme (defaults to random). This is specified in the object initialization line, analagous to how it is done for the sklean GaussianMixture package. There are two choices for the form of the covariance but those are specified by calling different fit functions. See preprint (https://arxiv.org/abs/2112.11424) for additional details.
Installation
The package can be installed using pip
pip install shapeGMM
or downloaded and installed with
python setup.py install
Usage
This package is designed to mimic the usage of the sklearn package. You first initiliaze the object and then fit. Predict can be done once the model is fit. Fit and ppredict functions take particle position trajectories as input in the form of a (n_frames, n_atoms, 3) numpy array.
Initialize:
from shapeGMM import gmm_shapes
sgmm_object = gmm_shapes.ShapeGMM(n_clusters,verbose=True)
Fit:
Uniform (spherical, uncorrelated) covariance:
aligned_trajectory = sgmm_object.fit_uniform(training_set_positions)
Weighted (Kronecker product) covariance:
aligned_trajectory = sgmm_object.fit_weighted(training_set_positions)
Predict:
Uniform (spherical, uncorrelated) covariance:
clusters, aligned_traj, log_likelihood = sgmm_object.predict_uniform(full_trajectory_positions)
Weighted (Kronecker product) covariance:
clusters, aligned_traj, log_likelihood = sgmm_object.predict_weighted(full_trajectory_positions)
Description of Contents
Test Cases
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file shapeGMM-0.0.5.tar.gz
.
File metadata
- Download URL: shapeGMM-0.0.5.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69b559830f4a18b330402fd2cf6fcc89be169fbeb27335f00f22b290b004f34b |
|
MD5 | 98ef9003034a78638dea9fa66458d35b |
|
BLAKE2b-256 | 3ad6fa3434c9f734b5664051b7503719e9cc6e8d5d75dd7a336a99bb107e259d |
File details
Details for the file shapeGMM-0.0.5-py3.8.egg
.
File metadata
- Download URL: shapeGMM-0.0.5-py3.8.egg
- Upload date:
- Size: 51.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e81069ebbcfe274c39623e0b721fddd6ee9d4f5f0fa0e2825d7287e941cc6b6 |
|
MD5 | 5535977396bac655d92964c20f554647 |
|
BLAKE2b-256 | b7def58738d6e4873328b9fadc708e308fb780fcd1a1a7bf8fc67a1e5530b4a9 |
File details
Details for the file shapeGMM-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: shapeGMM-0.0.5-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e7460ea6ff04077e0b48e43d64b637e502a7fea8e4c86f296fed79e22334cd5 |
|
MD5 | 23dc0e7eb2b2d2d0507fd7099492d515 |
|
BLAKE2b-256 | aa277098df6e010b5e45f58b89e208325682006127c0010a96834abd5c15dd4b |