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.2.0.tar.gz
.
File metadata
- Download URL: salamander_learn-0.2.0.tar.gz
- Upload date:
- Size: 30.6 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 | ce94a7dcc51fb4cc6e05e614afa0b50c0e24daea9bbb8ec87bd99c0e6d0b48ae |
|
MD5 | de30d58e49f3ee6f718368c91da6b260 |
|
BLAKE2b-256 | 4e1372400560b53b30eb8c5bf2de35b9b4cb7f5d84175aadba994018b4114341 |
File details
Details for the file salamander_learn-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: salamander_learn-0.2.0-py3-none-any.whl
- Upload date:
- Size: 38.6 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 | fb35c259159a18be4829700fff2fb5467989a6a69f3cafb1fdc2cd1fbadafd61 |
|
MD5 | b188a514a298dbfadc57994ceaa14383 |
|
BLAKE2b-256 | 18ec9b540b30bd062caf1b9b909001f5863a9a566144f7f6b8f286114b079725 |