Skip to main content

An integrated Python toolkit for classifiability analysis

Project description

pyCLAMs

pyCLAMs: An integrated Python toolkit for classifiability analysis [J]. SoftwareX, Volume 18, June 2022, 101007, doi: 10.1016/j.softx.2022.101007
https://doi.org/10.1016/j.softx.2022.101007

Warning

Since 0.3.x, we have reorganized the package structure. Any upper app should be revised accordingly.

Installation

pip install pyCLAMs pip install rpy2 Install the R runtime and the ECol library (https://github.com/lpfgarcia/ECoL).

Run 'install.packages("ECoL")' in R. It will take very long time. You must wait for the installation to complete.
Sometimes, you may want to change the CRAN mirror. Under the "Packages" menu, click "Set CRAN Mirror".
After installation, you can check by R command 'installed.packages()'.

How to use

Download the sample dataset from the /data folder Use the following sample code to use the package:

  # import the library
  import clams

  # load the dataset or generate a toy dataset by X,y = mvg(md = 2)
  df = pd.read_csv('sample.csv')
  X = np.array(df.iloc[:,:-1]) # skip first and last cols
  y = np.array(df.iloc[:,-1])

  # get all metrics
  clams.get_metrics(X,y) # Return a dictionary of all metrics

  # get metrics as JSON
  clams.get_json(X,y)

  # get an html report and display in Jupyter notebook
  from IPython.display import display, HTML
  display(HTML(clams.get_html(X,y)))

Extra Material

A more friendly GUI tool based on pyCLAMs can be accessed at http://spacs.brahma.pub/research/CLA

Metrics added since the original publication

classification.Mean_KLD - mean KLD (Kullback-Leibler divergence) between ground truth and predicted one-hot encodings
correlation.r2 - R2, the R-squared effect size
test.CHISQ, test.CHISQ.log10, test.CHISQ.CHI2 - Chi-squared test
classification.McNemar, classification.McNemar.CHI2 - McNemar test on the groud-truth and classifier's prediction

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

pyCLAMs-0.4.0.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

pyCLAMs-0.4.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyCLAMs-0.4.0.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pyCLAMs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 49962d2982b9c99a33bece11fb750b680ad7d69b42593b31f9cbe19250f09d41
MD5 15e1fee05f372e150f2a08f17c81113b
BLAKE2b-256 f6c3461227143224cba5e4010c6eb776b4af04ab59e9b745129a59c5112933ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyCLAMs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pyCLAMs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db85ab36798bc4270768f1fdb105509c8c1bd8c1cddcdd8365a6b4eabffe3722
MD5 85cbbaa4800944df012e5e8b8083163a
BLAKE2b-256 e4472edef7e8064c6be77df77a5d26e66a9eb37bdf416220e150800bec20f9e9

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