Skip to main content

Salamander is a non-negative matrix factorization framework for signature analysis

Project description

Salamander

Python versions supported License Code style

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


Download files

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

Source Distribution

salamander_learn-0.3.1.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

salamander_learn-0.3.1-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file salamander_learn-0.3.1.tar.gz.

File metadata

  • Download URL: salamander_learn-0.3.1.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-91-generic

File hashes

Hashes for salamander_learn-0.3.1.tar.gz
Algorithm Hash digest
SHA256 75137fd345a86836356ad5e16418355e7a9eec3798e5c80d5dbba2a54621a345
MD5 81446efd6a1d444246bbe55eb1882d52
BLAKE2b-256 67b1d6356b463481134544235e71da86f215dd9eb4ceea29dbb385e5d132d302

See more details on using hashes here.

File details

Details for the file salamander_learn-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: salamander_learn-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-91-generic

File hashes

Hashes for salamander_learn-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af028c854253b42057132ad358637bd3dc8720f91d206c08fbbfc690143ab375
MD5 d3dd436c30bd5166fc303fdbe1e2069e
BLAKE2b-256 55a004f50f428887f803152069086c3fbbf123514b782acf29a4d2e0071df21a

See more details on using hashes here.

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