Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add discriminability (one sample and two sample) #27

Merged
merged 30 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2f7a50b
Adding one sample test for discriminability
Nov 19, 2019
f32855b
Adding discriminability doc
Nov 20, 2019
588b213
Adding discriminability
Nov 21, 2019
31d37e3
adding unit test
Nov 23, 2019
82aa258
Bug fixing unit test
Nov 25, 2019
a304bac
Bug fixing unit test
Nov 25, 2019
e7bb5e5
Bug fixing unit test
Nov 26, 2019
d98a0b1
adding correction for the one sample test
Dec 2, 2019
633ec91
Fixed issues with docs, unit tests and addressing PR review comments
Dec 3, 2019
3f0480f
Merge branch 'master' into JD
sampan501 Dec 3, 2019
b18efb5
Update discrimTwoSample.py
sampan501 Dec 3, 2019
e946d77
Merge branch 'master' into JD
sampan501 Dec 9, 2019
6e37aec
Merge branch 'master' into JD
jdey4 Dec 10, 2019
3988a5e
merging master
Dec 10, 2019
00fe235
Merge branch 'master' into JD
jdey4 Dec 13, 2019
e548b03
Merge branch 'master' into JD
sampan501 Dec 15, 2019
be643b0
adding correction for coding formats
Dec 15, 2019
27d4d31
adding correction for final pr
Dec 15, 2019
fe7b3cf
adding correction for final pr
Dec 15, 2019
1615834
adding correction for final pr
Dec 15, 2019
aade79a
adding correction for final pr
Dec 15, 2019
0335642
Adding correction for code format using black
Dec 15, 2019
feda8d5
Adding correction for coding format
Dec 15, 2019
ddcc89a
Adding correction for coding format
Dec 15, 2019
33bf538
Adding correction for coding format
Dec 15, 2019
44ddaa1
added numba for two sample test
Dec 16, 2019
8950dbc
correcting doc formats
Dec 16, 2019
dce1584
correcting doc formats
Dec 16, 2019
087eb4b
correcting doc formats
Dec 16, 2019
2fd2f67
correcting doc formats
Dec 16, 2019
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
Prev Previous commit
Next Next commit
Adding discriminability doc
  • Loading branch information
jayanta dey authored and jayanta dey committed Nov 20, 2019
commit f32855bdec734581271626b41118446443d637ec
8 changes: 8 additions & 0 deletions docs/reference/dscr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Discriminability
****************

.. currentmodule:: mgc.dscr
sampan501 marked this conversation as resolved.
Show resolved Hide resolved

Discriminability one sample test
--------------------------------
.. autoclass:: oneSample
3 changes: 2 additions & 1 deletion docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Reference
*********

.. toctree::
:maxdepth: 2
:maxdepth: 3

dscr
independence
ksample
3 changes: 2 additions & 1 deletion mgc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import mgc.independence
import mgc.ksample
import mgc.time_series
import mgc.discriminability

__version__ = "0.0.1"
__version__ = "0.0.1"
File renamed without changes.
File renamed without changes.
20 changes: 11 additions & 9 deletions mgc/discriminability/oneSample.py → mgc/dscr/oneSample.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@

class oneSample(DiscriminabilityTest):
sampan501 marked this conversation as resolved.
Show resolved Hide resolved
r"""
A class that performs a one-sample test for whether the discriminability differs from random chance.
Performs a test of whether an observed discriminability is significantly different from chance, as described in [#1Dscr].
With :math: `D_X` the sample discriminability of :math: `X`:

..math::
A class that performs a one-sample test for whether the discriminability differs from random chance,
sampan501 marked this conversation as resolved.
Show resolved Hide resolved
as described in [1]. With :math:`D_X` as the sample discriminability of :math:`X`, it tests whether:

.. math::
H_0: D_X = D_0

and
..math::

.. math::
H_A: D_X > D_0

where D_0 is the discriminability that would be observed by random chance.
where :math:`D_0` is the discriminability that would be observed by random chance.

References
----------
.. [#1Dscr] Eric W. Bridgeford, et al. "Optimal Decisions for Reference Pipelines and Datasets: Applications in Connectomics." Bioarxiv (2019).
.. [#1Dscr] Eric W. Bridgeford, et al. "Optimal Decisions for Reference
Pipelines and Datasets: Applications in Connectomics." Bioarxiv (2019).
"""

def __init__(self):
Expand All @@ -35,7 +37,7 @@ def __init__(self):

def test(self, X, Y, isDist = False, remove_isolates=True, reps=1000, workers=-1):
sampan501 marked this conversation as resolved.
Show resolved Hide resolved
r"""
Calculates the Discriminability one sample test statistic and p-value.
Calculates the test statistic and p-value for Discriminability one sample test.

Parameters
----------
Expand Down