Ascopy

Ascopy is an MIT licensed Python implementation of Yuan et al.’s Copula method for correlation analysis and these pages will show you how to use it.

This documentation won’t teach you too much about Copula but there are a lot of resources available for that (try this one). Our paper explaining the Ascopy algorithm and implementation in detail. Ascopy is being actively developed on GitHub.

https://img.shields.io/badge/GitHub-yuanzunli%2FAscopy-blue.svg?style=flat https://img.shields.io/badge/arXiv-1810.12713-red https://img.shields.io/badge/arXiv-1810.12713-brightgreen https://img.shields.io/badge/license-MIT-blue.svg?style=flat https://pepy.tech/badge/Ascopy

Basic Usage

If you want to perform a Copula modeling or nction based on a survey data, you would do something like:

import numpy as np
import Ascopy as ac

with open('data.txt', 'r') as f:
    x, y= np.loadtxt(f, usecols=(0,1), unpack=True)

test = ac.Copula(x=x, y=y, copula_num=21, PDFx='norm', PDFy='norm')
test.run_mcmc()
res = test.plot_regress(sigma=3)

A more complete example is available in the Quickstart tutorial.

How to Use This Guide

To start, you’re probably going to need to follow the Installation guide to get Ascopy installed on your computer. After you finish that, you can probably learn most of what you need from the tutorials listed below (you might want to start with Quickstart and go from there). If you need more details about specific functionality, the User Guide below should have what you need.

We welcome bug reports, patches, feature requests, and other comments via the GitHub issue tracker, but you should check out the contribution guidelines first.

License & Attribution

Copyright 2022 Zunli Yuan and contributors.

kdeLF is free software made available under the MIT License. For details see the LICENSE.

Citation

Please cite the following papers if you found this code useful in your research:

  • Yuan, Z., Zhang, X., Wang, J., Cheng, X., & Wang, W. 2022, ApJS, 260, 10 (arXiv, ADS, BibTeX).

  • Yuan, Z., Jarvis, M. J., & Wang, J. 2020, ApJS, 248, 1 (arXiv, ADS, BibTeX).

Contributors

  • Wenjie Wang

Changelog