Skip to content

Commit c767ccf

Browse files
v0.7.2: Solve issue test_statistic equal to zero
1 parent 8d64800 commit c767ccf

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

phitter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.7.1"
1+
__version__ = "0.7.2"
22

33
from .main import PHITTER
44
from phitter import continuous

phitter/continuous/phitter_continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test(self, test_function, label: str, distribution):
6666
validation_test = False
6767
try:
6868
test = test_function(distribution, self.continuous_measures)
69-
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] > 0:
69+
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] >= 0:
7070
self.distribution_results[label] = {
7171
"test_statistic": test["test_statistic"],
7272
"critical_value": test["critical_value"],

phitter/discrete/phitter_discrete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test(self, test_function, label: str, distribution):
6363
validation_test = False
6464
try:
6565
test = test_function(distribution, self.discrete_measures)
66-
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] > 0:
66+
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] >= 0:
6767
self.distribution_results[label] = {
6868
"test_statistic": test["test_statistic"],
6969
"critical_value": test["critical_value"],

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "phitter"
7-
version = "0.7.1"
7+
version = "0.7.2"
88
description = "Find the best probability distribution for your dataset"
99
authors = [{name = "Sebastián José Herrera Monterrosa", email = "phitter.email@gmail.com"}]
1010
readme = "README.md"

tests/phitter_local/statistical_tests/singular/test_statistical_tests_discrete.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": 23,
66
"metadata": {},
77
"outputs": [],
88
"source": [
99
"import sys\n",
1010
"\n",
11-
"sys.path.append(\"../../\")\n",
11+
"sys.path.append(\"../../../../\")\n",
1212
"import phitter"
1313
]
1414
},
1515
{
1616
"cell_type": "code",
17-
"execution_count": 2,
17+
"execution_count": 24,
1818
"metadata": {},
1919
"outputs": [],
2020
"source": [
@@ -27,17 +27,17 @@
2727
},
2828
{
2929
"cell_type": "code",
30-
"execution_count": 3,
30+
"execution_count": 25,
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
34-
"path = \"../../datasets_test/discrete/sample_binomial.txt\"\n",
34+
"path = \"../../../../datasets_test/discrete/sample_binomial.txt\"\n",
3535
"data = get_data(path)"
3636
]
3737
},
3838
{
3939
"cell_type": "code",
40-
"execution_count": 4,
40+
"execution_count": 26,
4141
"metadata": {},
4242
"outputs": [],
4343
"source": [
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"cell_type": "code",
49-
"execution_count": 5,
49+
"execution_count": 27,
5050
"metadata": {},
5151
"outputs": [],
5252
"source": [
@@ -55,7 +55,7 @@
5555
},
5656
{
5757
"cell_type": "code",
58-
"execution_count": 6,
58+
"execution_count": 28,
5959
"metadata": {},
6060
"outputs": [
6161
{
@@ -67,7 +67,7 @@
6767
" 'rejected': False}"
6868
]
6969
},
70-
"execution_count": 6,
70+
"execution_count": 28,
7171
"metadata": {},
7272
"output_type": "execute_result"
7373
}
@@ -78,7 +78,7 @@
7878
},
7979
{
8080
"cell_type": "code",
81-
"execution_count": 7,
81+
"execution_count": 29,
8282
"metadata": {},
8383
"outputs": [
8484
{
@@ -90,7 +90,7 @@
9090
" 'rejected': False}"
9191
]
9292
},
93-
"execution_count": 7,
93+
"execution_count": 29,
9494
"metadata": {},
9595
"output_type": "execute_result"
9696
}
@@ -116,7 +116,7 @@
116116
"name": "python",
117117
"nbconvert_exporter": "python",
118118
"pygments_lexer": "ipython3",
119-
"version": "3.10.10"
119+
"version": "3.12.6"
120120
}
121121
},
122122
"nbformat": 4,

0 commit comments

Comments
 (0)