Statistical functions not included by canonical Python analytical packages.
Project description
A collection of statistical functions
version: 0.3.7
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stats_misc-0.3.7.tar.gz.
File metadata
- Download URL: stats_misc-0.3.7.tar.gz
- Upload date:
- Size: 59.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f36789635548117cd83004518d15a6686378c0e7ad6be98ef9af5be3918796d3
|
|
| MD5 |
74d98f674f7228eb48f934046eab2971
|
|
| BLAKE2b-256 |
a7234aa614a644949400ce0350932d7b3590c8750f649459c9a151c4fd5505c7
|
File details
Details for the file stats_misc-0.3.7-py3-none-any.whl.
File metadata
- Download URL: stats_misc-0.3.7-py3-none-any.whl
- Upload date:
- Size: 64.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20753b5004fdd0dd350bfee19a34372a5ec12a50ce0cd730d993d4bfd7414161
|
|
| MD5 |
d5fc0fc22ea1a0d954d1ed8c5e3f77ca
|
|
| BLAKE2b-256 |
74d5d9a96b4790897f66123de3c68914af60a0ab343b52ca7db7b3845d07872d
|