Skip to main content

A Python package for the Four-Parameter Beta Distribution and Likelihood-Based Estimation

Project description

beta4dist

beta4dist is a Python package designed for working with the four-parameter beta distribution and implementing likelihood-based estimation methods for its parameters. The package provides functions for generating samples, fitting the four-parameter beta distribution, and performing likelihood-based estimation (LBE).

Description

The goal of beta4dist is to provide an easy-to-use interface for:

  • Sampling from the four-parameter beta distribution.
  • Fitting the four-parameter beta distribution using likelihood-based estimation.
  • Implementing various estimation techniques for parameter inference.

This package is useful for statistical modeling and simulation, especially in situations where data follow a beta distribution but with additional flexibility due to the four-parameter formulation.

Installation

To install beta4dist, you can use the following command:

pip install beta4dist

Alternatively, you can clone the repository and install it locally:

git clone https://github.com/soham39039820/beta4dist.git
cd beta4dist
pip install .

Examples

Here are some basic examples demonstrating how to use beta4dist for generating samples and performing likelihood-based estimation.

1. Generate Samples from the Four-Parameter Beta Distribution

You can generate samples from the four-parameter beta distribution using the r4beta function:

from beta4dist.distribution import r4beta

# Generate 1000 samples from a 4-parameter beta distribution
samples = r4beta(1000, 2, 3, 0.5, 0.5)
print(samples[:10])  # Print the first 10 samples

2. Fit the Four-Parameter Beta Distribution Using Likelihood-Based Estimation

You can fit the distribution to your data using the LBE4beta function:

from beta4dist.beta4_model import LBE4beta

# Generate sample data
import numpy as np
samples = r4beta(1000, 2, 3, 0.5, 0.5)

# Perform likelihood-based estimation
params = LBE4beta(samples)

print("Estimated Parameters:", params)

3. Example Test Cases

The package also includes pre-defined tests to ensure that the model works as expected. You can run these tests using pytest:

pytest

This will execute the tests and report any issues.

Licensing

beta4dist is licensed under the MIT License.

References

For more information on the four-parameter beta distribution and its applications, please refer to the paper:

  • Paper Title: "SoftwareX: Efficient Statistical Modeling with the Four-Parameter Beta Distribution"
  • Authors: [Your Name], [Collaborators]
  • DOI: [DOI Link]

For more information, bug reports, or feature requests, please open an issue or a pull request on the GitHub repository.

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

beta4dist-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

beta4dist-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file beta4dist-0.1.0.tar.gz.

File metadata

  • Download URL: beta4dist-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for beta4dist-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b2902f9e282267ad49861a79805d86581cf149b5a96134e00da661b833aa391
MD5 3bf7d181ab2399aa7fa0a9d3978bd74f
BLAKE2b-256 7260849a1eeadc9d1247ad3435df0b4bbe469244416e6aea2d3fc53376be4f30

See more details on using hashes here.

File details

Details for the file beta4dist-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: beta4dist-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for beta4dist-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cf36fe739345b68d1ad5133b812161c39b9b2e35e9e673c0346e68ade780b65
MD5 19d884fc61278befdc7124e36599b8fd
BLAKE2b-256 f904412212d327d8be184b07b225be1cb672ef49ea2866ce6c2bccff7e7f53f2

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