Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
steps: [uses: fastai/workflows/quarto-ghp@master]
steps: [uses: fastai/workflows/quarto-ghp3@master]
2 changes: 1 addition & 1 deletion .github/workflows/test-nbdev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on: [workflow_dispatch, pull_request, push]
jobs:
test-nbdev:
runs-on: ubuntu-latest
steps: [uses: fastai/workflows/nbdev-ci@master]
steps: [uses: fastai/workflows/nbdev3-ci@master]
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ brings new visualizations, refined plots, and improved accuracy.

You can generate a Whorlmap directly from multi-dimensional DABEST
objects using the `.whorlmap()` method. See the [Whorlmap
tutorial](10-whorlmap.html) for more details.
tutorial](https://acclab.github.io/DABEST-python/tutorials/10-whorlmap.html)
for more details.

2. **Slopegraphs 📈: Enhanced summaries for paired data**

Expand All @@ -52,7 +53,8 @@ brings new visualizations, refined plots, and improved accuracy.
- Customize appearance with `group_summaries_kwargs`.

See the Group Summaries section in the [Plot Aesthetics
tutorial](08-plot_aesthetics.html) for more details.
tutorial](https://acclab.github.io/DABEST-python/tutorials/08-plot_aesthetics.html)
for more details.

3. **Mini-meta Weighted Delta Fix 🧮**

Expand All @@ -69,7 +71,8 @@ brings new visualizations, refined plots, and improved accuracy.
now color contrast bars and effect-size curves.

See the Custom Palette section in the [Plot Aesthetics
tutorial](08-plot_aesthetics.html) for examples.
tutorial](https://acclab.github.io/DABEST-python/tutorials/08-plot_aesthetics.html)
for examples.

Thank you for your continued support!

Expand Down Expand Up @@ -170,6 +173,17 @@ snippets.

## How to cite

**Getting over ANOVA: Estimation graphics for multi-group comparisons**

*Zinan Lu, Jonathan Anns, Yishan Mai, Rou Zhang, Kahseng Lian, Nicole
MynYi Lee, Shan Hashir, Lucas Wang Zhuoyu, A. Rosa Castillo Gonzalez,
Joses Ho, Hyungwon Choi, Sangyu Xu, Adam Claridge-Chang*

bioRxiv preprint 2026.
[10.64898/2026.01.26.701654](http://dx.doi.org/10.64898/2026.01.26.701654)

[PDF](https://www.biorxiv.org/content/10.64898/2026.01.26.701654v1.full.pdf)

**Moving beyond P values: Everyday data analysis with estimation plots**

*Joses Ho, Tayfun Tumkaya, Sameer Aryal, Hyungwon Choi, Adam
Expand Down
6 changes: 3 additions & 3 deletions dabest/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/load.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['load', 'prop_dataset']

# %% ../nbs/API/load.ipynb 4
# %% ../nbs/API/load.ipynb #218e4f14
def load(
data,
idx=None,
Expand Down Expand Up @@ -112,7 +112,7 @@ def load(
ps_adjust,
)

# %% ../nbs/API/load.ipynb 5
# %% ../nbs/API/load.ipynb #570ff65a
import numpy as np
from typing import Union, Optional
import pandas as pd
Expand Down
8 changes: 4 additions & 4 deletions dabest/_bootstrap_tools.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/bootstrap.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['bootstrap', 'jackknife_indexes', 'bca']

# %% ../nbs/API/bootstrap.ipynb 3
# %% ../nbs/API/bootstrap.ipynb #4231300f
import numpy as np
import pandas as pd
import seaborn as sns
Expand All @@ -12,7 +12,7 @@
from scipy.stats import mannwhitneyu, wilcoxon, norm
import warnings

# %% ../nbs/API/bootstrap.ipynb 4
# %% ../nbs/API/bootstrap.ipynb #e86b4b8d
class bootstrap:
"""
Computes the summary statistic and a bootstrapped confidence interval.
Expand Down Expand Up @@ -230,7 +230,7 @@ def __repr__(self):
b = "[{} CI: {}, {}]".format(self.ci, self.bca_ci_low, self.bca_ci_high)
return "\n".join([a, b])

# %% ../nbs/API/bootstrap.ipynb 5
# %% ../nbs/API/bootstrap.ipynb #00c814b9
def jackknife_indexes(data):
# Taken without modification from scikits.bootstrap package.
"""
Expand Down
10 changes: 4 additions & 6 deletions dabest/_dabest_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/dabest_object.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['Dabest']

# %% ../nbs/API/dabest_object.ipynb 5
# %% ../nbs/API/dabest_object.ipynb #d3c6f47a
# Import standard data science libraries
import warnings
from numpy import array, repeat, random, issubdtype, number
Expand All @@ -14,7 +14,7 @@
from scipy.stats import norm
from scipy.stats import randint

# %% ../nbs/API/dabest_object.ipynb 7
# %% ../nbs/API/dabest_object.ipynb #350b12c1
class Dabest(object):

"""
Expand Down Expand Up @@ -559,14 +559,12 @@ def _check_errors(self, x, y, idx, experiment, experiment_label, x1_level):
self.__x1_level = x1_level

if self.__is_paired and self.__output_data.isnull().values.any():
warn1 = f"NaN values detected under paired setting and removed,"
warn1 = f"NaN values detected under paired setting,"
warn2 = f" please check your data."
warnings.warn(warn1 + warn2)
if x is not None and y is not None:
rmname = self.__output_data[self.__output_data[y].isnull()][self.__id_col].tolist()
self.__output_data = self.__output_data[~self.__output_data[self.__id_col].isin(rmname)]
elif x is None and y is None:
self.__output_data.dropna(inplace=True)

# Check if there is a typo on paired
if self.__is_paired and self.__is_paired not in ("baseline", "sequential"):
Expand Down
8 changes: 4 additions & 4 deletions dabest/_delta_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/delta_objects.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['DeltaDelta', 'MiniMetaDelta']

# %% ../nbs/API/delta_objects.ipynb 5
# %% ../nbs/API/delta_objects.ipynb #1814896d
from scipy.stats import norm
import pandas as pd
import numpy as np
Expand All @@ -15,7 +15,7 @@
import warnings
import datetime as dt

# %% ../nbs/API/delta_objects.ipynb 6
# %% ../nbs/API/delta_objects.ipynb #1bb53e06
class DeltaDelta(object):
r"""
A class to compute and store the delta-delta statistics for experiments with a 2-by-2 arrangement where two independent variables, A and B, each have two categorical values, 1 and 2. The data is divided into two pairs of two groups, and a primary delta is first calculated as the mean difference between each of the pairs:
Expand Down Expand Up @@ -382,7 +382,7 @@ def results(self):
self.__compute_results()
return self.__results

# %% ../nbs/API/delta_objects.ipynb 10
# %% ../nbs/API/delta_objects.ipynb #18462ec5
class MiniMetaDelta(object):
"""
A class to compute and store the weighted delta.
Expand Down
10 changes: 5 additions & 5 deletions dabest/_effsize_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/API/effsize_objects.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['TwoGroupsEffectSize', 'EffectSizeDataFrame', 'PermutationTest']

# %% ../nbs/API/effsize_objects.ipynb 5
# %% ../nbs/API/effsize_objects.ipynb #430d4ea8
import pandas as pd
import lqrt
from scipy.stats import norm
Expand All @@ -23,7 +23,7 @@
from string import Template
import scipy.stats as spstats

# %% ../nbs/API/effsize_objects.ipynb 6
# %% ../nbs/API/effsize_objects.ipynb #9d988bdd
class TwoGroupsEffectSize(object):

"""
Expand Down Expand Up @@ -818,7 +818,7 @@ def bec_pct_high(self):
return self.__bec_pct_high


# %% ../nbs/API/effsize_objects.ipynb 10
# %% ../nbs/API/effsize_objects.ipynb #024b1d00
class EffectSizeDataFrame(object):
"""A class that generates and stores the results of bootstrapped effect
sizes for several comparisons."""
Expand Down Expand Up @@ -1658,7 +1658,7 @@ def delta2(self):
def is_delta_delta(self):
return self.__delta2

# %% ../nbs/API/effsize_objects.ipynb 29
# %% ../nbs/API/effsize_objects.ipynb #5d49f77f
class PermutationTest:
"""
A class to compute and report permutation tests.
Expand Down
6 changes: 3 additions & 3 deletions dabest/_stats_tools/confint_1group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/confint_1group.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['create_bootstrap_indexes', 'compute_1group_jackknife', 'compute_1group_acceleration', 'compute_1group_bootstraps',
'compute_1group_bias_correction', 'summary_ci_1group']

# %% ../../nbs/API/confint_1group.ipynb 4
# %% ../../nbs/API/confint_1group.ipynb #9181f236
import numpy as np
from numpy.random import PCG64, RandomState
from scipy.stats import norm
from numpy import sort as npsort

# %% ../../nbs/API/confint_1group.ipynb 5
# %% ../../nbs/API/confint_1group.ipynb #bac09924
def create_bootstrap_indexes(array, resamples=5000, random_seed=12345):
"""Given an array-like, returns a generator of bootstrap indexes
to be used for resampling.
Expand Down
6 changes: 3 additions & 3 deletions dabest/_stats_tools/confint_2group_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/confint_2group_diff.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['create_jackknife_indexes', 'create_repeated_indexes', 'compute_meandiff_jackknife', 'bootstrap_indices',
'compute_bootstrapped_diff', 'delta2_bootstrap_loop', 'compute_delta2_bootstrapped_diff',
'compute_meandiff_bias_correction', 'compute_interval_limits', 'calculate_group_var',
'calculate_bootstraps_var', 'calculate_weighted_delta']

# %% ../../nbs/API/confint_2group_diff.ipynb 4
# %% ../../nbs/API/confint_2group_diff.ipynb #fa733643
import numpy as np
from numpy import arange, delete, errstate
from numpy import mean as npmean
Expand All @@ -18,7 +18,7 @@
from scipy.stats import norm
from numpy import isnan

# %% ../../nbs/API/confint_2group_diff.ipynb 5
# %% ../../nbs/API/confint_2group_diff.ipynb #8cf9b1fc
@njit(cache=True, parallel=True)
def create_jackknife_indexes(data):
"""
Expand Down
22 changes: 11 additions & 11 deletions dabest/_stats_tools/effsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/effsize.ipynb.

# %% ../../nbs/API/effsize.ipynb 4
# %% ../../nbs/API/effsize.ipynb #9d92d449
from __future__ import annotations
import numpy as np
from numba import njit
Expand All @@ -11,10 +11,10 @@
from scipy.stats import mannwhitneyu


# %% auto 0
# %% auto #0
__all__ = ['two_group_difference', 'func_difference', 'cohens_d', 'cohens_h', 'hedges_g', 'cliffs_delta', 'weighted_delta']

# %% ../../nbs/API/effsize.ipynb 5
# %% ../../nbs/API/effsize.ipynb #0547f8a7
def two_group_difference(control:list|tuple|np.ndarray, #Accepts lists, tuples, or numpy ndarrays of numeric types.
test:list|tuple|np.ndarray, #Accepts lists, tuples, or numpy ndarrays of numeric types.
is_paired=None, #If not None, returns the paired Cohen's d
Expand Down Expand Up @@ -99,7 +99,7 @@ def two_group_difference(control:list|tuple|np.ndarray, #Accepts lists, tuples,
return cliffs_delta(control, test)


# %% ../../nbs/API/effsize.ipynb 6
# %% ../../nbs/API/effsize.ipynb #c93f36d4
def func_difference(control:list|tuple|np.ndarray, # NaNs are automatically discarded.
test:list|tuple|np.ndarray, # NaNs are automatically discarded.
func, # Summary function to apply.
Expand Down Expand Up @@ -135,7 +135,7 @@ def func_difference(control:list|tuple|np.ndarray, # NaNs are automatically disc
return func(test) - func(control)


# %% ../../nbs/API/effsize.ipynb 7
# %% ../../nbs/API/effsize.ipynb #c6dd20e4
@njit(cache=True)
def cohens_d(control:list|tuple|np.ndarray,
test:list|tuple|np.ndarray,
Expand Down Expand Up @@ -210,7 +210,7 @@ def cohens_d(control:list|tuple|np.ndarray,

return M / divisor

# %% ../../nbs/API/effsize.ipynb 8
# %% ../../nbs/API/effsize.ipynb #93688770
# @njit(cache=True) # It uses np.seterr which is not supported by Numba
def cohens_h(control:list|tuple|np.ndarray,
test:list|tuple|np.ndarray
Expand Down Expand Up @@ -247,7 +247,7 @@ def cohens_h(control:list|tuple|np.ndarray,
return phi_test - phi_control


# %% ../../nbs/API/effsize.ipynb 9
# %% ../../nbs/API/effsize.ipynb #bcd77c32
def hedges_g(control:list|tuple|np.ndarray,
test:list|tuple|np.ndarray,
is_paired:str=None)->float:
Expand All @@ -271,7 +271,7 @@ def hedges_g(control:list|tuple|np.ndarray,
correction_factor = _compute_hedges_correction_factor(len_c, len_t)
return correction_factor * d

# %% ../../nbs/API/effsize.ipynb 10
# %% ../../nbs/API/effsize.ipynb #8fafb111
@njit(cache=True)
def _mann_whitney_u(x, y):
"""Numba-optimized Mann-Whitney U calculation"""
Expand Down Expand Up @@ -307,7 +307,7 @@ def cliffs_delta(control:list|tuple|np.ndarray,
return _cliffs_delta_core(c, t)


# %% ../../nbs/API/effsize.ipynb 11
# %% ../../nbs/API/effsize.ipynb #7a772510
@njit(cache=True)
def _compute_standardizers(control, test):
"""
Expand Down Expand Up @@ -356,7 +356,7 @@ def _compute_standardizers(control, test):

return pooled, average

# %% ../../nbs/API/effsize.ipynb 12
# %% ../../nbs/API/effsize.ipynb #4529e82c
def _compute_hedges_correction_factor(n1,
n2
)->float:
Expand Down Expand Up @@ -390,7 +390,7 @@ def _compute_hedges_correction_factor(n1,

return out

# %% ../../nbs/API/effsize.ipynb 13
# %% ../../nbs/API/effsize.ipynb #249e5375
@njit(cache=True)
def weighted_delta(difference, bootstrap_dist_var):
'''
Expand Down
6 changes: 3 additions & 3 deletions dabest/_stats_tools/precompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/API/precompile.ipynb.

# %% auto 0
# %% auto #0
__all__ = ['precompile_all']

# %% ../../nbs/API/precompile.ipynb 4
# %% ../../nbs/API/precompile.ipynb #35aa9337
import numpy as np
from tqdm import tqdm
from . import effsize
from . import confint_2group_diff

# %% ../../nbs/API/precompile.ipynb 5
# %% ../../nbs/API/precompile.ipynb #472d8104
_NUMBA_COMPILED = False

def precompile_all():
Expand Down
Loading