Salamander is a non-negative matrix factorization framework for signature analysis
Project description
Salamander
Salamander is a non-negative matrix factorization (NMF) framework for signature analysis. It implements multiple NMF algorithms, common visualizations, and can be easily customized & expanded.
Installation
PyPI:
pip install salamander-learn
Usage
The following example illustrates the basic syntax:
import pandas as pd
import salamander
# samples and features have to be named appropriately
data_path = "..."
data = pd.read_csv(data_path, index_col=0)
# NMF with a Poisson noise model
model = salamander.KLNMF(n_signatures=5)
model.fit(data)
# barplot
model.plot_signatures()
# stacked barplot
model.plot_exposures()
# signature correlation
model.plot_correlation()
# sample_correlation
model.plot_correlation(data="samples")
# dimensionality reduction of the exposures
# method: umap, pca or tsne
model.plot_embeddings(method="umap")
For examples of how to customize any NMF algorithm and the plots, check out the tutorial. The following algorithms are currently available:
License
MIT
Changelog
Consult the CHANGELOG file for enhancements and fixes of each version.
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 Distribution
File details
Details for the file salamander_learn-0.3.0.tar.gz
.
File metadata
- Download URL: salamander_learn-0.3.0.tar.gz
- Upload date:
- Size: 32.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-87-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79cd02685c62be50279d92a09129c46da7e1e975be477cc135bea5fdfe7e6035 |
|
MD5 | 87ead26e2c5ddd1d44f3644e1d8ae8d4 |
|
BLAKE2b-256 | e164efceddfacf4dbcaebe7222ae35dde22cae4b682231ad2b9f7e13df2ca793 |
File details
Details for the file salamander_learn-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: salamander_learn-0.3.0-py3-none-any.whl
- Upload date:
- Size: 40.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-87-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19d53518ce9406b5b4c842e473640447798dbda442780454f04b4632092da163 |
|
MD5 | b722d5090b82fa14ab84094bf9727686 |
|
BLAKE2b-256 | 7396475e5ae2edbce8fa547121e602d50577282c970ccb6ccbeee45150ee278a |