Skip to content

Commit

Permalink
MRG: Better docstring for clustering & stats (mne-tools#4743)
Browse files Browse the repository at this point in the history
* DOC: Better docstring

* FIX: Fix docs

* ENH: Reorganize

* DOC: Many updates

* FIX: Fix docstrings

* FIX: Fix for doctest

* ENH: Plot each section

* FIX: Use nearest

* FIX: Address comments

* STY: Cleaner breaks

* FIX: Fix CircleCI check

* FIX: Address comments

* FIX: Revert CircleCI
  • Loading branch information
larsoner authored Nov 16, 2017
1 parent 4e5a6c3 commit 14e8f60
Show file tree
Hide file tree
Showing 18 changed files with 1,084 additions and 853 deletions.
9 changes: 8 additions & 1 deletion doc/_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,11 @@ h4.list-group-item-heading {
.collapse.in{
display:block !important;
}
}
}

.skinnytable {
width: auto;
}
.skinnytable thead {
border-bottom: 1px solid black;
}
7 changes: 4 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,17 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('http://docs.python.org', None),
'numpy': ('http://docs.scipy.org/doc/numpy-dev', None),
'scipy': ('http://scipy.github.io/devdocs', None),
'python': ('https://docs.python.org/3', None),
'numpy': ('https://docs.scipy.org/doc/numpy-dev', None),
'scipy': ('https://scipy.github.io/devdocs', None),
'matplotlib': ('http://matplotlib.org', None),
'sklearn': ('http://scikit-learn.org/stable', None),
'mayavi': ('http://docs.enthought.com/mayavi/mayavi', None),
'nibabel': ('http://nipy.org/nibabel', None),
'nilearn': ('http://nilearn.github.io', None),
'surfer': ('https://pysurfer.github.io/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
'statsmodels': ('http://www.statsmodels.org/stable/', None),
}

examples_dirs = ['../examples', '../tutorials']
Expand Down
9 changes: 6 additions & 3 deletions doc/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ There are also **examples**, which contain a short use-case to highlight MNE-fun
auto_tutorials/plot_modifying_data_inplace.rst
auto_tutorials/plot_ecog.rst
manual/memory.rst
manual/migrating.rst

.. raw:: html

Expand Down Expand Up @@ -464,7 +465,7 @@ There are also **examples**, which contain a short use-case to highlight MNE-fun
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapse_statistics">Statistics in sensor- and source-space</a>
<a data-toggle="collapse" href="#collapse_statistics">Statistics</a>
</h4>
</div>
<div id="collapse_statistics" class="panel-collapse collapse">
Expand All @@ -476,14 +477,13 @@ There are also **examples**, which contain a short use-case to highlight MNE-fun
.. toctree::
:maxdepth: 1

manual/statistics.rst
auto_tutorials/plot_background_statistics.rst

**Sensor Space**

.. toctree::
:maxdepth: 1

auto_tutorials/plot_stats_cluster_methods.rst
auto_tutorials/plot_stats_spatio_temporal_cluster_sensors.rst
auto_tutorials/plot_stats_cluster_1samp_test_time_frequency.rst
auto_tutorials/plot_stats_cluster_time_frequency.rst
Expand Down Expand Up @@ -670,6 +670,9 @@ There are also **examples**, which contain a short use-case to highlight MNE-fun
manual/gui/browse.rst
manual/appendix/bem_model.rst
manual/appendix/c_misc.rst
manual/appendix/c_release_notes.rst
manual/appendix/c_EULA.rst
manual/appendix/martinos.rst

**MNE-MATLAB**

Expand Down
136 changes: 0 additions & 136 deletions doc/manual/index.rst

This file was deleted.

100 changes: 0 additions & 100 deletions doc/manual/statistics.rst

This file was deleted.

35 changes: 28 additions & 7 deletions doc/python_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ Connectivity Estimation
phase_slope_index


.. _api_reference_statistics:

Statistics
==========

Expand All @@ -884,33 +886,52 @@ Statistics

.. currentmodule:: mne.stats

Parametric statistics (see :mod:`scipy.stats` and :mod:`statsmodels` for more
options):

.. autosummary::
:toctree: generated/
:template: function.rst

ttest_1samp_no_p
f_oneway
f_mway_rm
f_threshold_mway_rm
linear_regression
linear_regression_raw

Mass-univariate multiple comparison correction:

.. autosummary::
:toctree: generated/
:template: function.rst

bonferroni_correction
fdr_correction

Non-parametric (clustering) resampling methods:

.. autosummary::
:toctree: generated/
:template: function.rst

permutation_cluster_test
permutation_cluster_1samp_test
permutation_t_test
spatio_temporal_cluster_test
spatio_temporal_cluster_1samp_test
ttest_1samp_no_p
linear_regression
linear_regression_raw
f_oneway
f_mway_rm
f_threshold_mway_rm
summarize_clusters_stc

Functions to compute neighbor/adjacency matrices for cluster-level statistics:
Compute ``connectivity`` matrices for cluster-level statistics:

.. currentmodule:: mne

.. autosummary::
:toctree: generated/
:template: function.rst

channels.find_ch_connectivity
channels.read_ch_connectivity
spatial_dist_connectivity
spatial_src_connectivity
spatial_tris_connectivity
Expand Down
2 changes: 2 additions & 0 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Bug

- Fix bug in :meth:`mne.io.Raw.plot` to correctly display event types when annotations are present by `Clemens Brunner`_

- Fix bug in :func:`mne.stats.spatio_temporal_cluster_test` default value for ``threshold`` is now calculated based on the array sizes in ``X``, by `Eric Larson`_

API
~~~

Expand Down
1 change: 0 additions & 1 deletion examples/datasets/plot_spm_faces_dataset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# doc:slow-example
"""
==========================================
From raw data to dSPM on SPM Faces dataset
Expand Down
Loading

0 comments on commit 14e8f60

Please sign in to comment.