A python package for MF (matrix factorization) based DR (dimensionality reduction) algorithms.
Project description
pyMFDR
publication: Matrix Factorization Based Dimensionality Reduction Algorithms - A Comparative Study on Spectroscopic Profiling Data. Analytical Chemistry, 2022, DOI: 10.1021/acs.analchem.2c01922
This is a python package for MF (matrix factorization) based DR (dimensionality reduction) algorithms.
Content of repo ├── src : source code ├── data : contains the dataset (.csv) used for the study └── notebooks : contains the jupyter notebook for the study
Installation
pip install pyMFDR
How to use
Download the sample dataset from the /data folder Use the following sample code to use the package:
# import the library from pyMFDR import mfdr # load the dataset or generate a toy dataset by X,y = mvg(md = 2) df = pd.read_csv('7047_C02.csv') X = df.iloc[:,2:cols-1].values # -1 for removing the last column that contains NAN y = df.iloc[:,1].values.ravel() # first col is index and not used in this study # get a list of available MFDR algorithms mfdr.get_algorithms() # it will ouptut ['PCA', 'NMF', 'LAE', 'RP', 'SRP', 'VQ', 'AA', 'ICA'] # Run PCA on X. It will return W, H, Xr and the inner algorithm object. W,H,Xr,o = mfdr.mf(X, 3, alg = 'PCA', display = False) # evaluate the dimensionality reduction quality by various metrics mfdr.evaluate_dr(X,W,Xr) # visualize H mfdr.visualize_dictionary(H)
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
pymfdr-0.1.5.tar.gz
(21.1 kB
view details)
Built Distribution
pyMFDR-0.1.5-py3-none-any.whl
(21.3 kB
view details)
File details
Details for the file pymfdr-0.1.5.tar.gz
.
File metadata
- Download URL: pymfdr-0.1.5.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae4302cf0e06c64e9c172fbb120f0d68393e58d6eabfddc31a697c603c1d0f73 |
|
MD5 | d67d3f9e67b17969abfc2c1178b5cdf2 |
|
BLAKE2b-256 | 39b8cff5761ef6d9b1b50a33886a9cbf3efe1669d4a5b3b4207b65fb04907c88 |
File details
Details for the file pyMFDR-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: pyMFDR-0.1.5-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58f837fe58c2263a77499a27cde86305e22de85b831bf03830d150940e0511c8 |
|
MD5 | 0fbfd725b33f320d606a231dee98297b |
|
BLAKE2b-256 | 6607fae5c82068a636c007332db2909455a75189baea5ae9cf225980e35bf586 |