Skip to main content

A library for the copula

Project description

==================================================
This library is now part of the ambhas
(http://pypi.python.org/pypi/ambhas/) library.
Updates will only be made in the ambhas library.
==================================================


============
Copulalib
============

This is a package/library in python to model the copulas.
This is being developed under the project `AMBHAS <http://www.ambhas.com/>`_.

This contains module for the following copula
------------------------------------------------
* Frank
* Clayton
* Gumbel


Installing copulalib
======================

Installing copulalib can be done by downloading source file (copulalib--<version>.tar.gz),
and after unpacking issuing the command::

python setup.py install

This requires the usual Distutils options available.

Or, download the copulalib--<version>.tar.gz file and issue the command::

pip /path/to/copulalib--<version>.tar.gz

Or, directly using the pip::

pip install copulalib


Usage
=========
Import required modules::

import numpy as np
import matplotlib.pyplot as plt
from copulalib.copulalib import Copula

Generate random (normal distributed) numbers::

x = np.random.normal(size=100)
y = 2.5*x+ np.random.normal(size=100)

Make the instance of Copula class with x, y and clayton family::

foo = Copula(x, y, family='clayton')

Print the Kendall's rank correlation::

print foo.tau

Print spearmen's correlation::

print foo.sr

Print pearson's correlation::

print foo.pr

Print the parameter (theta) of copula::

print foo.theta

Generate the 1000 samples (U,V) of copula::

X1, Y1 = foo.generate_xy(1000)

For more details see the test.py file inside module.

Changelog
=========

1.1.0 (June 2011)
------------------

- Changed from function orieted to object oriented, documentation improved.

1.0.0 (May 2011)
------------------

- Initial release


Any questions/comments
=========================
If you have any comment/suggestion/question,
please feel free to write me at satkumartomer@gmail.com

So far, the documents are not well explained,
I will be updating them soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

copulalib-1.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

copulalib-1.1.0.linux-x86_64.tar.gz (7.3 kB view details)

Uploaded Source

copulalib-1.1.0.linux-x86_64.exe (68.7 kB view details)

Uploaded Source

File details

Details for the file copulalib-1.1.0.tar.gz.

File metadata

  • Download URL: copulalib-1.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for copulalib-1.1.0.tar.gz
Algorithm Hash digest
SHA256 253fb9ba68b6d45b34d3c618e368d2f982829379e8cc377c6204afd40484ef02
MD5 7f72fa5ba68b218e1bd10e1856282a06
BLAKE2b-256 ecee62bb8a731fb879733b558ba185dd0cc7ca80e8dedc0f000dc97549b64510

See more details on using hashes here.

File details

Details for the file copulalib-1.1.0.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for copulalib-1.1.0.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 2c627d9ad056794baee5dc690c9921477c2ebd071b9d17b58138edbf26b4c6bd
MD5 ca0b32f43266c558e6ee5f715ada04a1
BLAKE2b-256 0d8b7b9a07596f81dcc6881c8079a9e890548cbe5fb6d63873e61e32d8c4edf3

See more details on using hashes here.

File details

Details for the file copulalib-1.1.0.linux-x86_64.exe.

File metadata

File hashes

Hashes for copulalib-1.1.0.linux-x86_64.exe
Algorithm Hash digest
SHA256 16b2063449efe6e35cb7716c82b8bac4940f4627d7e002120b243fa818913de3
MD5 b97dc7374cdb688f0d14375ca889c780
BLAKE2b-256 7f2c6f483b76856d2b9c57eb442ab6b428a761b3f168e3ee7328d9b9f43e0c9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page