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.2.tar.gz
(19.0 kB
view details)
Built Distribution
pyMFDR-0.1.2-py3-none-any.whl
(19.5 kB
view details)
File details
Details for the file pyMFDR-0.1.2.tar.gz
.
File metadata
- Download URL: pyMFDR-0.1.2.tar.gz
- Upload date:
- Size: 19.0 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 | 5ad5ae81e74e137e4e4c7789ad11afc6b9cc9542c6c59a776d315f7e0c52867f |
|
MD5 | a91bf89d433944c195dc17d141a9196a |
|
BLAKE2b-256 | 5e605f2e53e11ba56e4e37c64a40db8fdd3ae9f544b2e978c1175a2e11269542 |
File details
Details for the file pyMFDR-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pyMFDR-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.5 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 | 0a795e283599aa65f1475e74f2e344363c72cd2babca133f742a9fda0b7834ce |
|
MD5 | ad0b7e20c9805e876687310e2a0735c1 |
|
BLAKE2b-256 | 0e947f83ee60dea2293ce101c2d7ef928ef4826e56a7bf91aa3c3af84321a1a7 |