Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Sep 27, 2024
1 parent d411f28 commit 832c604
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion simba/SimBA.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions simba/mixins/statistics_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 832c604

Please sign in to comment.