Skip to content

Commit 29692f6

Browse files
committed
Merge branch 'hotfix-BEST-wrong-desitions'
2 parents 453638a + 0b1255e commit 29692f6

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

bayesian_models/models.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,10 +1405,11 @@ def predict(self, var_names:typing.Sequence[str]=['Δμ'],
14051405
- | multilevel_on:str='[' := A separator defining the
14061406
multilevel index. :code:`pymc` by default
14071407
concatinates the label according to the form:
1408-
{var_name}[{feature_label}]. The argument will
1409-
reindex them in a multilevel fashion of the form
1410-
(var_name, feature_label) in the resulting
1411-
dataframe. Set to None to disable this behavior.
1408+
:code:`{var_name}[{feature_label}]`. The argument
1409+
will reindex them in a multilevel fashion of the
1410+
form :code:`(var_name, feature_label)` in the
1411+
resulting dataframe. Set to None to disable this
1412+
behavior.
14121413
14131414
- | extend_summary:bool=True := If True the new
14141415
Significance column extends the summary dataframe.
@@ -1454,14 +1455,14 @@ def predict(self, var_names:typing.Sequence[str]=['Δμ'],
14541455
warn(("Length of variables, ropes and hdis not equal. The"
14551456
" shortest value will be considered"))
14561457
results=dict()
1457-
null_interval = interval(0,0)
1458+
null_interval = interval()
14581459
for var_name, rope,hdi in zip(var_names,ropes, hdis):
14591460
raw_summary = az.summary(self.idata, var_names=[var_name],
14601461
filter_vars='like', hdi_prob=hdi)
1461-
rope=interval(*rope)
1462+
rope=interval(rope)
14621463
out=[]
14631464
for idx,row in raw_summary.iterrows():
1464-
ci=interval(row[2], row[3])
1465+
ci=interval([row[2], row[3]])
14651466
if ci in rope:
14661467
out.append("Not Significant")
14671468
elif ci & rope != null_interval:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
name = "bayesian-models"
44

5-
version = "0.1.2"
5+
version = "0.1.3"
66
authors = [
77
{ name="Alexander Rodis", email="[email protected]" },
88
]

tests/BEST_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def test_ground_truth(self):
251251
sig = results["Δσ"].loc[:,"Significance"]
252252
self.assertTrue( Δμ.iloc[0]-ref_val_mu <= ε)
253253

254-
def test_desition_rule(self):
254+
def test_decision_rule(self):
255255
obj = BEST()(self.df, "group")
256256
obj.fit(tune=1000, draws=2000, chains=2,
257257
progressbar=False)
@@ -402,4 +402,5 @@ def test_68(self):
402402
obj = BEST(
403403
std_difference=True, effect_magnitude=True
404404
)(df, "target")
405-
self.assertTrue(True)
405+
self.assertTrue(True)
406+

tests/core_modelbuilder_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
from bayesian_models.core import ModelAdaptorComponent
3030
from bayesian_models.core import ResponseFunctionComponent
3131
from bayesian_models.core import ResponseFunctions
32-
from bayesian_models.core import NeuralNetCoreComponent
3332
from bayesian_models.data import Data
34-
from bayesian_models.models import Layer
3533
from bayesian_models.utilities import powerset, dict_powerset
3634
from bayesian_models.data import Data
3735

0 commit comments

Comments
 (0)