A python package for MF (matrix factorization) based DR (dimensionality reduction) algorithms.
Project description
pyMFDR
A python package for MF (matrix factorization) based DR (dimensionality reduction) algorithms.
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.1.tar.gz
(18.9 kB
view details)
Built Distribution
pyMFDR-0.1.1-py3-none-any.whl
(19.4 kB
view details)
File details
Details for the file pyMFDR-0.1.1.tar.gz
.
File metadata
- Download URL: pyMFDR-0.1.1.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/1.5.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60eae6e9ab120cdb638c1c43847a8f1858f0aaa7c4cfb061a5c7d322a0facad0 |
|
MD5 | fe29578cc1c94bce21f7a22333f79e39 |
|
BLAKE2b-256 | 8fdeefa7bc6b74190a423be8d65040016a174ba86ecde141d44de4b02025bce6 |
File details
Details for the file pyMFDR-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyMFDR-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/1.5.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25b5baa06861eb692ac4898cbdca16fce57136e637bcbe374dd6e5b668597c4e |
|
MD5 | 871bfaa3682eb482dee5cbad719eca4a |
|
BLAKE2b-256 | 787ce54b5d7c76b37dde3d1d96734d90b363303e92fb1394bdb74c360fa468f0 |