A small example package
Project description
-
Summary:
- This package includes codes and data for "Efficient Bayesian Inference on Quantile Spectral Analysis of Multivariate Stationary Time Series" by Zhixiong Hu and Raquel Prado.
- The codes are written in Python 3.7.0 (suggested version >= 3.7).
- Author: Zhixiong Hu
-
Set Up
- Install Anaconda Python from: https://www.anaconda.com/products/individual
Note: If conda command is still unavailable in the terminal, please open Anaconda Navigator app (installed in the previous step) and open the terminal as following:
- Open the terminal as in the previous step. To install the package, type 'pip install -i https://pypi.org/simple/ example-qspec==0.1.0' (or type 'pip install --upgrade example_qspec')
- 'cd' to where the [packaging_tutorial/test] folder is located (set [test] as work directory)
-
Run Test Code:
- In the [test] folder, [runbook_1.py] and [runbook_2.py] are runbooks to show how to use our approach to reproduce part of the results in the paper.
- Use Anacoda Prompt command line, type 'python runbook_1.py' or 'python runbook_2.py' to run the test code.
- The results will be stored (as .png files) in [test] folder.
- The [test/utils] folder includes sample data used in the runbooks.
-
Use .npy data in R
- All the data is stored as .npy files. To load .npy in R, use the following command:
# R code, please download reticulate R package first
library(reticulate)
np <- import("numpy")
array = np$load('test/utils/qvar1.npy') # specify where .npy is
- Useful linkes:
- Anaconda: https://www.anaconda.com/products/individual
- tensorflow: https://www.tensorflow.org/api_docs (Tensorflow GPU setup: https://www.tensorflow.org/install/gpu)
- tensorflow-probability: https://www.tensorflow.org/probability
Note We are actively updating the code. For example, currently the naming convention is messy. In the next step, we want to follow PeP-8 style to improve the readability and consistency of our Python code.
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
example_qspec-0.1.0.tar.gz
(662.0 kB
view hashes)
Built Distribution
Close
Hashes for example_qspec-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc4908c0ebd77d5c54c4f7ecd46efc47935c36cda4e0ef099971747a6b616d6f |
|
MD5 | 06c340b179d70d98ee4be44d85f2ab6f |
|
BLAKE2b-256 | bda5f620e453a892b9cfcdf3b31790488a026b923175effeb020b967b2fa4dad |