Skip to content

Commit

Permalink
v0.7.2: Solve issue test_statistic equal to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianherreramonterrosa committed Oct 8, 2024
1 parent 8d64800 commit c767ccf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion phitter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.7.1"
__version__ = "0.7.2"

from .main import PHITTER
from phitter import continuous
Expand Down
2 changes: 1 addition & 1 deletion phitter/continuous/phitter_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test(self, test_function, label: str, distribution):
validation_test = False
try:
test = test_function(distribution, self.continuous_measures)
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] > 0:
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] >= 0:
self.distribution_results[label] = {
"test_statistic": test["test_statistic"],
"critical_value": test["critical_value"],
Expand Down
2 changes: 1 addition & 1 deletion phitter/discrete/phitter_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test(self, test_function, label: str, distribution):
validation_test = False
try:
test = test_function(distribution, self.discrete_measures)
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] > 0:
if numpy.isnan(test["test_statistic"]) == False and numpy.isinf(test["test_statistic"]) == False and test["test_statistic"] >= 0:
self.distribution_results[label] = {
"test_statistic": test["test_statistic"],
"critical_value": test["critical_value"],
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "phitter"
version = "0.7.1"
version = "0.7.2"
description = "Find the best probability distribution for your dataset"
authors = [{name = "Sebastián José Herrera Monterrosa", email = "[email protected]"}]
readme = "README.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"\n",
"sys.path.append(\"../../\")\n",
"sys.path.append(\"../../../../\")\n",
"import phitter"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -27,17 +27,17 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"path = \"../../datasets_test/discrete/sample_binomial.txt\"\n",
"path = \"../../../../datasets_test/discrete/sample_binomial.txt\"\n",
"data = get_data(path)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -46,7 +46,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -55,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 28,
"metadata": {},
"outputs": [
{
Expand All @@ -67,7 +67,7 @@
" 'rejected': False}"
]
},
"execution_count": 6,
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -78,7 +78,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 29,
"metadata": {},
"outputs": [
{
Expand All @@ -90,7 +90,7 @@
" 'rejected': False}"
]
},
"execution_count": 7,
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -116,7 +116,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.12.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit c767ccf

Please sign in to comment.