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_PSIs(n, savepath = 'PSIs_' + 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.9.tar.gz
(17.9 kB
view details)
Built Distribution
cs1-0.0.9-py3-none-any.whl
(18.1 kB
view details)
File details
Details for the file cs1-0.0.9.tar.gz
.
File metadata
- Download URL: cs1-0.0.9.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11be002953aef94248fda9dfaaed8604631c814e27016a08432464ac57582c6b |
|
MD5 | f6f54e8653bcc46d2974feeafde820f8 |
|
BLAKE2b-256 | 79fedb6c31616c28f191a67588f11f44e79751fd4f4374a9acf29bbf59d5b51b |
File details
Details for the file cs1-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: cs1-0.0.9-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d21ffc3059891253ae3020255c320308a0bcce661eab5567e4b8fc3b9db6e50c |
|
MD5 | bc3130a8e8b7b4d1e159d3627660a6e3 |
|
BLAKE2b-256 | 30624c23c7b66d7262f515caaeab09a2f753dc1e91061308ce10130f8060454d |