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.4.0.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

salamander_learn-0.4.0-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for salamander_learn-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1e8b35c5861b495cb20ac68bd00769c87c2707c28c888efd37e2dfd0f091a11f
MD5 970f7c501f53fd8b3b5775ca4581a79c
BLAKE2b-256 d078152e583d7055ee2a422acb963ef69beb4eda97093d68d14cdc6e0ff11b5f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for salamander_learn-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dea3031ebc8449c9468e6c14eb02880d71d5d54b4a727ed7b66cfea8d7acd37
MD5 f9c5abf151e42fd0b61c949c5e46ab3f
BLAKE2b-256 15f663a2c6a8a13948f57c891a99dc86a94a598fdd31c1e1788b9a774e4794f0

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