From 832c604e028ed387a77abb5c33b5d744dad7cf8d Mon Sep 17 00:00:00 2001 From: sronilsson Date: Thu, 26 Sep 2024 20:27:36 -0400 Subject: [PATCH] docs --- simba/SimBA.py | 1 - simba/mixins/statistics_mixin.py | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/simba/SimBA.py b/simba/SimBA.py index e262f5545..db3c5f6ef 100644 --- a/simba/SimBA.py +++ b/simba/SimBA.py @@ -16,7 +16,6 @@ from tkinter.messagebox import askyesno import PIL.Image -from PIL import ImageTk from simba.bounding_box_tools.boundary_menus import BoundaryMenus from simba.cue_light_tools.cue_light_menues import CueLightAnalyzerMenu diff --git a/simba/mixins/statistics_mixin.py b/simba/mixins/statistics_mixin.py index 0eaa54c8e..6fb94851f 100644 --- a/simba/mixins/statistics_mixin.py +++ b/simba/mixins/statistics_mixin.py @@ -145,7 +145,8 @@ def independent_samples_t( sample_2: np.ndarray, critical_values: Optional[np.ndarray] = None, ) -> (float, Union[None, bool]): - """ + + r""" Jitted compute independent-samples t-test statistic and boolean significance between two distributions. .. note:: @@ -3781,10 +3782,10 @@ def adjusted_rand(x: np.ndarray, y: np.ndarray) -> float: ARI = \\frac{TP + TN}{TP + FP + FN + TN} where: - - TP (True Positive) is the number of pairs of elements that are in the same cluster in both x and y, - - FP (False Positive) is the number of pairs of elements that are in the same cluster in y but not in x, - - FN (False Negative) is the number of pairs of elements that are in the same cluster in x but not in y, - - TN (True Negative) is the number of pairs of elements that are in different clusters in both x and y. + - :math:`TP` (True Positive) is the number of pairs of elements that are in the same cluster in both x and y, + - :math:`FP` (False Positive) is the number of pairs of elements that are in the same cluster in y but not in x, + - :math:`FN` (False Negative) is the number of pairs of elements that are in the same cluster in x but not in y, + - :math:`TN` (True Negative) is the number of pairs of elements that are in different clusters in both x and y. The ARI value ranges from -1 to 1. A value of 1 indicates perfect clustering agreement, 0 indicates random clustering, and negative values indicate disagreement between the clusterings. @@ -4052,7 +4053,7 @@ def wave_hedges_distance(self, x: np.ndarray, y: np.ndarray) -> float: :example: >>> x = np.random.randint(0, 500, (1000,)) >>> y = np.random.randint(0, 500, (1000,)) - >>> wave_hedges_distance(x=x, y=y) + >>> Statistics().wave_hedges_distance(x=x, y=y) """ check_valid_array(data=x, source=f'{Statistics.wave_hedges_distance.__name__} x', accepted_ndims=(1,), accepted_dtypes=Formats.NUMERIC_DTYPES.value)