Skip to main content

Statistical functions not included by canonical Python analytical packages.

Project description

A collection of statistical functions

version: 0.3.8

This repository offers a collection of Python-based statistical modules, encompassing hypothesis testing, interval estimation, resampling methods, regression techniques (including Firth’s logistic regression), and selected machine learning utilities.

The documentation for stats-misc can be found here.

Installation

The package is available on PyPI, and conda, with the latest source code available on gitlab.

Installation using PyPI

To install the package from PyPI, run:

pip install stats-misc

This installs the latest stable release along with its dependencies.

Installation using conda

A Conda package is maintained in my personal Conda channel. To install from this channel, run:

conda install afschmidt::stats-misc

Installation using gitlab

If you require the latest updates, potentially not yet formally released, you can install the package directly from GitLab.

First, clone the repository and move into its root directory:

git clone git@gitlab.com:SchmidtAF/stats-misc.git
cd stat-misc

Install the dependencies:

# From the root of the repository
conda env create --file ./resources/conda/envs/conda_create.yaml

To add to an existing environment use:

# From the root of the repository
conda env update --file ./resources/conda/envs/conda_create.yaml

Next the package can be installed:

make install

Development

For development work, install the package in editable mode with Git commit hooks configured:

make install-dev

This command installs the package in editable mode and configures Git commit hooks, allowing you to run git pull to update the repository or switch branches without reinstalling.

Alternatively, you can install manually:

python -m pip install -e .
python .setup_git_hooks.py

Git Hooks Configuration

When setting up a development environment, the setup-hooks command configures Git hooks to enforce conventional commit message formatting and spell check using codespell.

To view the commit message format requirements, run:

./.githooks/commit-msg -help

For frequent use, add this function to your shell configuration (~/.bashrc or ~/.zshrc):

commit-format-help() {
    local git_root
    git_root=$(git rev-parse --show-toplevel 2>/dev/null)
    
    if [ -z "$git_root" ]; then
        echo "Error: Not inside a git repository"
        return 1
    fi
    
    local hook_path="$git_root/.githooks/commit-msg"
    
    if [ ! -f "$hook_path" ]; then
        echo "Error: commit-msg hook not found"
        return 1
    fi
    
    "$hook_path" --help
}

Validating the package

After installation, you may wish to run the included test suite with pytest to verify that the package is functioning as expected.

# From the root of the repository
pytest tests

Usage

Please have a look at the examples in resources .

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

stats_misc-0.3.8.tar.gz (62.0 kB view details)

Uploaded Source

Built Distribution

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

stats_misc-0.3.8-py3-none-any.whl (67.4 kB view details)

Uploaded Python 3

File details

Details for the file stats_misc-0.3.8.tar.gz.

File metadata

  • Download URL: stats_misc-0.3.8.tar.gz
  • Upload date:
  • Size: 62.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for stats_misc-0.3.8.tar.gz
Algorithm Hash digest
SHA256 c42680123b4fb7c3f0ea5cd1c8650c35c63522c00a0b87654b6fac5c05e50674
MD5 785c13dfb85005503f6b68c1431015cb
BLAKE2b-256 8772ae300e4d1969486633116e1d019025659c9a7a5a2115c7c3458ab865b424

See more details on using hashes here.

File details

Details for the file stats_misc-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: stats_misc-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 67.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for stats_misc-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f17181b71280d73391fb88c88916f2b2cffeadf792b7389b5e8007ef18c9d765
MD5 57bd0cfcb9da7b4248611037a57bf8d6
BLAKE2b-256 73edb1fc5fbc5218af81d8d471dc9fd7678d68ccb90882fab2fe0b164a2619f1

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