Skip to main content

Performs bootstrapping of a dataset to produce plots and statistics for use in final reports and documents.

Project description

StrapvizPy

example workflow codecov Documentation Status

Summary

Performs bootstrapping of a sample to produce plots and statistics for use in final reports and documents.

The purpose of this package is to simplify and automate the process of creating simple bootstrap distributions of numerical samples. The package has a module which intakes a sample and relevant parameters such as the desired confidence bounds and number of simulations. The module will perform the simulation statistics to generate the bootstrap distribution and relevant statistics such as the sample mean and bootstrapped confidence interval. The package also has a module for visualization of the bootstraped confidence interval, and for creating a professional publication-ready table of the relevant statistics.

Package context within the Python ecosystem

The package builds on NumPy and Matplotlib packages, and is designed to conduct bootstrap sampling and visualization using them. scikit-learn has a utils module with a resample method which has bootstrapping functionality. But StrapvizPy streamlines the process of bootstrapping from data to visualization and embedding in documents which is not available as a single bundle. Some tutorials on bootstrap confidence intervals from machinelearningmastery.com and towardsdatascience.com encourage the reader to plot the results manually.

Installation

$ pip install strapvizpy

Usage

To import strapvizpy and check the version:

import strapvizpy
print(strapvizpy.__version__)

To import the suite of functions:

from strapvizpy import bootstrap
from strapvizpy import display

Please view our packaged documentation here.

Functions

  • bootstrap_distribution: Returns a sampling distribution of specified replicates is generated for a specified estimator with replacement for a given bootstrap sample size.
  • calculate_boot_stats: Calculates a confidence interval for a given sampling distribution as well as other bootstrapped statistics.
  • plot_ci: Creates a histogram of a bootstrapped sampling distribution with its confidence interval and observed sample statistic.
  • tabulate_stats: Generates a table that contains a given sampling distribution's mean and standard deviation along with relevant statistics as well as a summary table of the bootstrap distributions parameters. The code automatically saves the tables as html documents.

Contributing

Julien Gordon, Gautham Pughazhendhi, Zack Tang, and Margot Vore.

License

StrapvizPy was created by Julien Gordon, Gautham Pughazhendhi, Zack Tang, Margot Vore. It is licensed under the terms of the MIT license.

Credits

StrapvizPy was created with cookiecutter and the py-pkgs-cookiecutter template.

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

strapvizpy-0.2.4.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

strapvizpy-0.2.4-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file strapvizpy-0.2.4.tar.gz.

File metadata

  • Download URL: strapvizpy-0.2.4.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for strapvizpy-0.2.4.tar.gz
Algorithm Hash digest
SHA256 46d630eaf2ca0abae3efc35756c58d25b3cb1283a7d2331123445e1999fb11ef
MD5 4ab8e89e256d61a6ba0a4ac3d7f14248
BLAKE2b-256 03205928916d71316ae7acc21a6859262ade86d3c017faac89bab510b9609242

See more details on using hashes here.

File details

Details for the file strapvizpy-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: strapvizpy-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for strapvizpy-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 36ae02dc167821a57bea2661eecf5ae62d8088b3462bd35806d1fc7f977f4a18
MD5 dc7272315f5fe665d97dca5f8bab6479
BLAKE2b-256 3816f34645f94709f4575942c090bfd7ff7cd7225248248d9bda0848c6ff7fbd

See more details on using hashes here.

Supported by

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