stats-misc 0.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stats_misc-0.3.5/LICENSE +17 -0
- stats_misc-0.3.5/PKG-INFO +143 -0
- stats_misc-0.3.5/README.md +100 -0
- stats_misc-0.3.5/pyproject.toml +51 -0
- stats_misc-0.3.5/requirements-dev.txt +21 -0
- stats_misc-0.3.5/requirements.txt +8 -0
- stats_misc-0.3.5/setup.cfg +4 -0
- stats_misc-0.3.5/stats_misc/__init__.py +1 -0
- stats_misc-0.3.5/stats_misc/_version.py +1 -0
- stats_misc-0.3.5/stats_misc/constants.py +491 -0
- stats_misc-0.3.5/stats_misc/example_data/__init__.py +0 -0
- stats_misc-0.3.5/stats_misc/example_data/example_datasets/endometrial.tsv.gz +0 -0
- stats_misc-0.3.5/stats_misc/example_data/example_datasets/sex2.tsv.gz +0 -0
- stats_misc-0.3.5/stats_misc/example_data/examples.py +325 -0
- stats_misc-0.3.5/stats_misc/intervals.py +387 -0
- stats_misc-0.3.5/stats_misc/machine_learning/__init__.py +1 -0
- stats_misc-0.3.5/stats_misc/machine_learning/firthlogist.py +631 -0
- stats_misc-0.3.5/stats_misc/machine_learning/sklearn_utils.py +239 -0
- stats_misc-0.3.5/stats_misc/machine_learning/sksurv_utils.py +482 -0
- stats_misc-0.3.5/stats_misc/machine_learning/validation.py +811 -0
- stats_misc-0.3.5/stats_misc/meta_analysis.py +601 -0
- stats_misc-0.3.5/stats_misc/resampling.py +1153 -0
- stats_misc-0.3.5/stats_misc/tests.py +264 -0
- stats_misc-0.3.5/stats_misc/utils/__init__.py +1 -0
- stats_misc-0.3.5/stats_misc/utils/general.py +459 -0
- stats_misc-0.3.5/stats_misc/utils/helpers.py +195 -0
- stats_misc-0.3.5/stats_misc.egg-info/PKG-INFO +143 -0
- stats_misc-0.3.5/stats_misc.egg-info/SOURCES.txt +29 -0
- stats_misc-0.3.5/stats_misc.egg-info/dependency_links.txt +1 -0
- stats_misc-0.3.5/stats_misc.egg-info/requires.txt +26 -0
- stats_misc-0.3.5/stats_misc.egg-info/top_level.txt +1 -0
stats_misc-0.3.5/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2024 Amand Floriaan Schmidt (amand.schmidt@ucl.ac.uk)
|
|
5
|
+
|
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
This program is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stats-misc
|
|
3
|
+
Version: 0.3.5
|
|
4
|
+
Summary: Statistical functions not included by canonical Python analytical packages.
|
|
5
|
+
Author-email: Amand Floriaan Schmidt <floriaanschmidt@gmail.com>
|
|
6
|
+
License-Expression: GPL-3.0-or-later
|
|
7
|
+
Project-URL: Homepage, https://gitlab.com/SchmidtAF/stats-misc
|
|
8
|
+
Project-URL: Documentation, https://SchmidtAF.gitlab.io/stats-misc/
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
14
|
+
Requires-Python: <3.13,>=3.11
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: pandas>=2.2
|
|
18
|
+
Requires-Dist: numpy<1.24,>=1.18
|
|
19
|
+
Requires-Dist: numba>=0.56.4
|
|
20
|
+
Requires-Dist: scipy>=1.5
|
|
21
|
+
Requires-Dist: scikit-learn>=1.4
|
|
22
|
+
Requires-Dist: scikit-survival>=0.24
|
|
23
|
+
Requires-Dist: statsmodels>=0.14
|
|
24
|
+
Requires-Dist: tabulate
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=6; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-mock>=3; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-dependency>=0.5; extra == "dev"
|
|
29
|
+
Requires-Dist: bump2version>=1; extra == "dev"
|
|
30
|
+
Requires-Dist: jupyter; extra == "dev"
|
|
31
|
+
Requires-Dist: build; extra == "dev"
|
|
32
|
+
Requires-Dist: twine; extra == "dev"
|
|
33
|
+
Requires-Dist: sphinx-rtd-theme; extra == "dev"
|
|
34
|
+
Requires-Dist: sphinx-bootstrap-theme; extra == "dev"
|
|
35
|
+
Requires-Dist: furo; extra == "dev"
|
|
36
|
+
Requires-Dist: myst-parser; extra == "dev"
|
|
37
|
+
Requires-Dist: notebook; extra == "dev"
|
|
38
|
+
Requires-Dist: nbsphinx; extra == "dev"
|
|
39
|
+
Requires-Dist: nbsphinx-link; extra == "dev"
|
|
40
|
+
Requires-Dist: sphinx-argparse; extra == "dev"
|
|
41
|
+
Requires-Dist: numpydoc; extra == "dev"
|
|
42
|
+
Dynamic: license-file
|
|
43
|
+
|
|
44
|
+
# A collection of statistical functions
|
|
45
|
+
__version__: `0.3.5`
|
|
46
|
+
|
|
47
|
+
This repository offers a collection of Python-based statistical modules,
|
|
48
|
+
encompassing hypothesis testing, interval estimation, resampling methods,
|
|
49
|
+
regression techniques (including Firth’s logistic regression),
|
|
50
|
+
and selected machine learning utilities.
|
|
51
|
+
|
|
52
|
+
The documentation for stats-misc can be found [here](https://SchmidtAF.gitlab.io/stats-misc/).
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
At present, this package is undergoing development and no packages exist yet on PyPI.
|
|
57
|
+
Therefore it is recommended that you install in either of the two ways below.
|
|
58
|
+
|
|
59
|
+
### Installation using conda
|
|
60
|
+
I maintain a conda package in my personal conda channel. To install from this please run:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
conda install afschmidt::stats-misc
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Installation using pip
|
|
67
|
+
You can install using pip from the root of the cloned repository,
|
|
68
|
+
first clone and cd into the repository root:
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
git clone git@gitlab.com:SchmidtAF/stats-misc.git
|
|
72
|
+
cd stat-misc
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Install the dependencies:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
# From the root of the repository
|
|
79
|
+
conda env create --file ./resources/conda/envs/conda_create.yaml
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
To add to an existing environment use:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
# From the root of the repository
|
|
86
|
+
conda env update --file ./resources/conda/envs/conda_create.yaml
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Next the package can be installed:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
python -m pip install .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Or for an editable (developer) install run the command below from the root of
|
|
96
|
+
the repository.
|
|
97
|
+
The difference with this is that you can just to a `git pull` to
|
|
98
|
+
update repository, or switch branches without re-installing:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
python -m pip install -e .
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
### Installation not using any conda dependencies
|
|
105
|
+
If you are not using conda in any way then install the dependencies via `pip`
|
|
106
|
+
and install repository as an editable install also via pip:
|
|
107
|
+
|
|
108
|
+
Install dependencies:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
python -m pip install --upgrade -r requirements.txt
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Then to install repository you can either do:
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
python -m pip install .
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Or for an editable (developer) install run the command below from the root of
|
|
121
|
+
the repository.
|
|
122
|
+
The difference with this is that you can just to a `git pull` to update
|
|
123
|
+
repository, or switch branches without re-installing:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
python -m pip install -e .
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Next steps...
|
|
130
|
+
After installation, you may wish to run the included test suite with `pytest` to verify
|
|
131
|
+
that the package is functioning as expected.
|
|
132
|
+
|
|
133
|
+
```sh
|
|
134
|
+
# From the root of the repository
|
|
135
|
+
pytest tests
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Usage
|
|
139
|
+
|
|
140
|
+
Please have a look at the examples in
|
|
141
|
+
[resources](https://gitlab.com/SchmidtAF/stat-misc/-/tree/master/resources/examples)
|
|
142
|
+
.
|
|
143
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# A collection of statistical functions
|
|
2
|
+
__version__: `0.3.5`
|
|
3
|
+
|
|
4
|
+
This repository offers a collection of Python-based statistical modules,
|
|
5
|
+
encompassing hypothesis testing, interval estimation, resampling methods,
|
|
6
|
+
regression techniques (including Firth’s logistic regression),
|
|
7
|
+
and selected machine learning utilities.
|
|
8
|
+
|
|
9
|
+
The documentation for stats-misc can be found [here](https://SchmidtAF.gitlab.io/stats-misc/).
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
At present, this package is undergoing development and no packages exist yet on PyPI.
|
|
14
|
+
Therefore it is recommended that you install in either of the two ways below.
|
|
15
|
+
|
|
16
|
+
### Installation using conda
|
|
17
|
+
I maintain a conda package in my personal conda channel. To install from this please run:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
conda install afschmidt::stats-misc
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Installation using pip
|
|
24
|
+
You can install using pip from the root of the cloned repository,
|
|
25
|
+
first clone and cd into the repository root:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
git clone git@gitlab.com:SchmidtAF/stats-misc.git
|
|
29
|
+
cd stat-misc
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Install the dependencies:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
# From the root of the repository
|
|
36
|
+
conda env create --file ./resources/conda/envs/conda_create.yaml
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To add to an existing environment use:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
# From the root of the repository
|
|
43
|
+
conda env update --file ./resources/conda/envs/conda_create.yaml
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Next the package can be installed:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
python -m pip install .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or for an editable (developer) install run the command below from the root of
|
|
53
|
+
the repository.
|
|
54
|
+
The difference with this is that you can just to a `git pull` to
|
|
55
|
+
update repository, or switch branches without re-installing:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
python -m pip install -e .
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
### Installation not using any conda dependencies
|
|
62
|
+
If you are not using conda in any way then install the dependencies via `pip`
|
|
63
|
+
and install repository as an editable install also via pip:
|
|
64
|
+
|
|
65
|
+
Install dependencies:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
python -m pip install --upgrade -r requirements.txt
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Then to install repository you can either do:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
python -m pip install .
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Or for an editable (developer) install run the command below from the root of
|
|
78
|
+
the repository.
|
|
79
|
+
The difference with this is that you can just to a `git pull` to update
|
|
80
|
+
repository, or switch branches without re-installing:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
python -m pip install -e .
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Next steps...
|
|
87
|
+
After installation, you may wish to run the included test suite with `pytest` to verify
|
|
88
|
+
that the package is functioning as expected.
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
# From the root of the repository
|
|
92
|
+
pytest tests
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Usage
|
|
96
|
+
|
|
97
|
+
Please have a look at the examples in
|
|
98
|
+
[resources](https://gitlab.com/SchmidtAF/stat-misc/-/tree/master/resources/examples)
|
|
99
|
+
.
|
|
100
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "stats-misc"
|
|
7
|
+
version = "0.3.5"
|
|
8
|
+
description = "Statistical functions not included by canonical Python analytical packages."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11, <3.13"
|
|
11
|
+
license = "GPL-3.0-or-later"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{name = "Amand Floriaan Schmidt", email = "floriaanschmidt@gmail.com" }
|
|
15
|
+
]
|
|
16
|
+
dynamic = ["dependencies", "optional-dependencies"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Programming Language :: Python",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: Implementation :: PyPy"
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://gitlab.com/SchmidtAF/stats-misc"
|
|
27
|
+
Documentation = "https://SchmidtAF.gitlab.io/stats-misc/"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.dynamic]
|
|
30
|
+
dependencies = {file = ["requirements.txt"]}
|
|
31
|
+
optional-dependencies.dev = {file = ["requirements-dev.txt"]}
|
|
32
|
+
|
|
33
|
+
[tool.setuptools]
|
|
34
|
+
include-package-data = true
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.packages.find]
|
|
37
|
+
include = ["stats_misc*"]
|
|
38
|
+
exclude = ["tests", "*.tests", "*.tests.*", "tests.*"]
|
|
39
|
+
|
|
40
|
+
[tool.setuptools.package-data]
|
|
41
|
+
"stats_misc" = ["*.md", "*.txt", "*.rst", "example_data/example_datasets/*.tsv.gz"]
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.exclude-package-data]
|
|
44
|
+
"*" = ["tests/*"]
|
|
45
|
+
|
|
46
|
+
[tool.pytest.ini_options]
|
|
47
|
+
markers = [
|
|
48
|
+
"datafiles: load datafiles"
|
|
49
|
+
]
|
|
50
|
+
testpaths = ["tests"]
|
|
51
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# testing
|
|
2
|
+
pytest>=6
|
|
3
|
+
pytest-mock>=3
|
|
4
|
+
pytest-dependency>=0.5
|
|
5
|
+
|
|
6
|
+
# dev tooling
|
|
7
|
+
bump2version>=1
|
|
8
|
+
jupyter
|
|
9
|
+
build
|
|
10
|
+
twine
|
|
11
|
+
|
|
12
|
+
# documentation
|
|
13
|
+
sphinx-rtd-theme
|
|
14
|
+
sphinx-bootstrap-theme
|
|
15
|
+
furo
|
|
16
|
+
myst-parser
|
|
17
|
+
notebook
|
|
18
|
+
nbsphinx
|
|
19
|
+
nbsphinx-link
|
|
20
|
+
sphinx-argparse
|
|
21
|
+
numpydoc
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from ._version import __version__
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.3.5'
|