Compressed Sensing library for 1D Spectroscopic Profiling Data
Project description
cs1
Compressed Sensing library for 1D Spectroscopic Profiling
Installation
pip install cs1
A simple startup
from cs1.cs import *
# Generate common non-adaptive bases and save to a local pickle file.
# The generation process can be very slow, so save it for future use.
cs.Generate_PSIHs(n, savepath = 'PSIHs_' + str(n) + '.pkl') # n is the data/signal dimensionality
# load back bases
file = open('PSIs_' + str(n) + '.pkl','rb')
PSIs = pickle.load(file)
file.close()
# sparsity analysis
Analyze_Sparsity(x, PSIs)
# compare different bases and sampling ratio on a single sample
rmses = GridSearch_Sensing_n_Recovery(x, PSIs, solver = 'LASSO') # returns relative MSEs
low-level cs functions
dftmtx()
dctmtx()
hwtmtx()
Sensing()
Recovery()
Mutual_Coherence()
...
singal processing functions for other domains
Simulate_ECG()
dct_lossy_signal_compression()
dft_lossy_signal_compression()
img_dct()
img_dft()
dct_lossy_image_compression()
dft_lossy_image_compression()
adaptive cs bases
from cs1.adaptive import *
PSI, _ = EBP(X) # X is a m-by-n training dataset. PSI is the EBP basis
PSI, _, _ = LDA(X, y, display = True) # X and y are training dataset. PSI is the LDA basis.
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
cs1-0.0.5.tar.gz
(17.7 kB
view details)
Built Distribution
cs1-0.0.5-py3-none-any.whl
(18.5 kB
view details)
File details
Details for the file cs1-0.0.5.tar.gz
.
File metadata
- Download URL: cs1-0.0.5.tar.gz
- Upload date:
- Size: 17.7 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 | 8eca1e2439a9e8a120a32d5258f41aa24d0bc413f20ccd4e6f148c2c24819cd0 |
|
MD5 | e8cc968cb3e60c13cb746050bd938f63 |
|
BLAKE2b-256 | 301a74cd69bdd816c6ccbbf03657e0f30dbe54435ee0b31d762d59c0fb51f5c2 |
File details
Details for the file cs1-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: cs1-0.0.5-py3-none-any.whl
- Upload date:
- Size: 18.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 | 7f18f43f9cc9af39ec9f2908226a5c9c01bf3535815fc2973fea3c1ed5f1a0c0 |
|
MD5 | 6f6d27e1068932314fcde06e63eabb56 |
|
BLAKE2b-256 | bd6a23a828fac9ec87f4dbe89b12b9e6c22537383a6b728f447b0bb03e0b9032 |