Skip to content

Commit edbbe19

Browse files
authored
[FIX] fwe docstrings (#868)
* make documentation/docstrings consistent * modify docstrings
1 parent f414999 commit edbbe19

15 files changed

Lines changed: 54 additions & 54 deletions

File tree

examples/02_meta-analyses/04_plot_estimators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
######################################################################################
113113
# Note that, to measure significance appropriately with the montecarlo method,
114114
# you need a lot more than 10 iterations.
115-
# We recommend 10000 (the default value).
115+
# We recommend 5000 (the default value).
116116
mc_meta = ALE(null_method="montecarlo", n_iters=10, n_cores=1)
117117
mc_results = mc_meta.fit(dset)
118118

examples/02_meta-analyses/08_plot_cbma_subtraction_conjunction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
###############################################################################
139139
# Subtraction analysis
140140
# -----------------------------------------------------------------------------
141-
# Typically, one would use at least 10000 iterations for a subtraction analysis.
141+
# Typically, one would use at least 5000 iterations for a subtraction analysis.
142142
# However, we have reduced this to 100 iterations for this example.
143143
# Similarly here we use a voxel-level z-threshold of 0.01, but in practice one would
144144
# use a more stringent threshold (e.g., 1.65).

nimare/annotate/gclda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ def fit(self, n_iters=5000, loglikely_freq=10):
362362
363363
Parameters
364364
----------
365-
n_iters : :obj:`int`, optional
366-
Number of iterations to run. Default is 10000.
365+
n_iters : :obj:`int`, default=5000
366+
Number of iterations to run. Default is 5000.
367367
loglikely_freq : :obj:`int`, optional
368368
The frequency with which log-likelihood is updated. Default value
369369
is 1 (log-likelihood is updated every iteration).

nimare/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get_params(self, deep=True):
101101
102102
Parameters
103103
----------
104-
deep : :obj:`bool`, optional
104+
deep : :obj:`bool`, default=True
105105
If True, will return the parameters for this estimator and
106106
contained subobjects that are estimators.
107107
@@ -183,7 +183,7 @@ def load(cls, filename, compressed=True):
183183
----------
184184
filename : :obj:`str`
185185
Name of file containing object.
186-
compressed : :obj:`bool`, optional
186+
compressed : :obj:`bool`, default=True
187187
If True, the file is assumed to be compressed and gzip will be used
188188
to load it. Otherwise, it will assume that the file is not
189189
compressed. Default = True.

nimare/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _get_parser():
6161
dest="n_iters",
6262
type=int,
6363
help=("Number of iterations for permutation testing."),
64-
default=10000,
64+
default=5000,
6565
)
6666
macm_parser.add_argument(
6767
"--v_thr",

nimare/correct.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ class FWECorrector(Corrector):
267267
using, use :meth:`inspect`.
268268
voxel_thresh : :obj:`float`, optional
269269
Only used if ``method='montecarlo'``. The uncorrected voxel-level threshold to use.
270-
n_iters : :obj:`int`, optional
270+
n_iters : :obj:`int`, default=5000
271271
Number of iterations to use for Monte Carlo correction.
272272
Default varies by Estimator.
273273
For publication-quality results, 5000 or more iterations are recommended.
274-
n_cores : :obj:`int`, optional
274+
n_cores : :obj:`int`, default=1
275275
Number of cores to use for Monte Carlo correction. Default is 1.
276276
**kwargs
277277
Keyword arguments to be used by the FWE correction implementation.
@@ -340,12 +340,12 @@ class FDRCorrector(Corrector):
340340
341341
Parameters
342342
----------
343-
method : :obj:`str`, optional
343+
method : :obj:`str`, default='indep'
344344
The FDR correction to use.
345345
Either 'indep' (for independent or positively correlated values) or 'negcorr'
346346
(for general or negatively correlated tests).
347347
Default is 'indep'.
348-
alpha : :obj:`float`, optional
348+
alpha : :obj:`float`, default=0.05
349349
The FDR correction rate to use. Default is 0.05.
350350
351351
Notes

nimare/decode/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def fit(self, dataset, drop_invalid=True):
8888
----------
8989
dataset : :obj:`~nimare.dataset.Dataset`
9090
Dataset object to analyze.
91-
drop_invalid : :obj:`bool`, optional
91+
drop_invalid : :obj:`bool`, default=True
9292
Whether to automatically ignore any studies without the required data or not.
9393
Default is True.
9494

nimare/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _collect_inputs(self, dataset, drop_invalid=True):
3838
Parameters
3939
----------
4040
dataset : :obj:`~nimare.dataset.Dataset`
41-
drop_invalid : :obj:`bool`, optional
41+
drop_invalid : :obj:`bool`, default=True
4242
Whether to automatically drop any studies in the Dataset without valid data or not.
4343
Default is True.
4444

nimare/meta/cbma/ale.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ class ALE(CBMAEstimator):
5454
This method is must slower, and is only slightly more accurate.
5555
======================= =================================================================
5656
57-
n_iters : :obj:`int`, optional
57+
n_iters : :obj:`int`, default=5000
5858
Number of iterations to use to define the null distribution.
5959
This is only used if ``null_method=="montecarlo"``.
60-
Default is 10000.
60+
Default is 5000.
6161
memory : instance of :class:`joblib.Memory`, :obj:`str`, or :class:`pathlib.Path`
6262
Used to cache the output of a function. By default, no caching is done.
6363
If a :obj:`str` is given, it is the path to the caching directory.
6464
memory_level : :obj:`int`, default=0
6565
Rough estimator of the amount of memory used by caching.
6666
Higher value means more memory for caching. Zero means no caching.
67-
n_cores : :obj:`int`, optional
67+
n_cores : :obj:`int`, default=1
6868
Number of cores to use for parallelization.
6969
This is only used if ``null_method=="montecarlo"``.
7070
If <=0, defaults to using all available cores.
@@ -135,7 +135,7 @@ def __init__(
135135
self,
136136
kernel_transformer=ALEKernel,
137137
null_method="approximate",
138-
n_iters=None,
138+
n_iters=5000,
139139
memory=Memory(location=None, verbose=0),
140140
memory_level=0,
141141
n_cores=1,
@@ -348,15 +348,15 @@ class ALESubtraction(PairwiseCBMAEstimator):
348348
kernel_transformer : :obj:`~nimare.meta.kernel.KernelTransformer`, optional
349349
Kernel with which to convolve coordinates from dataset.
350350
Default is ALEKernel.
351-
n_iters : :obj:`int`, optional
352-
Default is 10000.
351+
n_iters : :obj:`int`, default=5000
352+
Default is 5000.
353353
memory : instance of :class:`joblib.Memory`, :obj:`str`, or :class:`pathlib.Path`
354354
Used to cache the output of a function. By default, no caching is done.
355355
If a :obj:`str` is given, it is the path to the caching directory.
356356
memory_level : :obj:`int`, default=0
357357
Rough estimator of the amount of memory used by caching.
358358
Higher value means more memory for caching. Zero means no caching.
359-
n_cores : :obj:`int`, optional
359+
n_cores : :obj:`int`, default=1
360360
Number of processes to use for meta-analysis. If -1, use all available cores.
361361
Default is 1.
362362
@@ -652,9 +652,9 @@ class SCALE(CBMAEstimator):
652652
This parameter was previously incorrectly labeled as "optional" and indicated that
653653
it supports tab-delimited files, which it does not (yet).
654654
655-
n_iters : int, optional
656-
Number of iterations for statistical inference. Default: 10000
657-
n_cores : int, optional
655+
n_iters : int, default=5000
656+
Number of iterations for statistical inference. Default: 5000
657+
n_cores : int, default=1
658658
Number of processes to use for meta-analysis. If -1, use all available cores.
659659
Default: 1
660660
kernel_transformer : :obj:`~nimare.meta.kernel.KernelTransformer`, optional

nimare/meta/cbma/base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def _p_to_summarystat(self, p, null_method=None):
402402

403403
return ss
404404

405-
def _compute_null_reduced_montecarlo(self, ma_maps, n_iters=10000):
405+
def _compute_null_reduced_montecarlo(self, ma_maps, n_iters=5000):
406406
"""Compute uncorrected null distribution using the reduced montecarlo method.
407407
408408
This method is much faster than the full montecarlo approach, but is still slower than the
@@ -615,15 +615,15 @@ def correct_fwe_montecarlo(
615615
----------
616616
result : :obj:`~nimare.results.MetaResult`
617617
Result object from a CBMA meta-analysis.
618-
voxel_thresh : :obj:`float`, optional
618+
voxel_thresh : :obj:`float`, default=0.001
619619
Cluster-defining p-value threshold. Default is 0.001.
620-
n_iters : :obj:`int`, optional
620+
n_iters : :obj:`int`, default=5000
621621
Number of iterations to build the voxel-level, cluster-size, and cluster-mass FWE
622-
null distributions. Default is 10000.
623-
n_cores : :obj:`int`, optional
622+
null distributions. Default is 5000.
623+
n_cores : :obj:`int`, default=1
624624
Number of cores to use for parallelization.
625625
If <=0, defaults to using all available cores. Default is 1.
626-
vfwe_only : :obj:`bool`, optional
626+
vfwe_only : :obj:`bool`, default=False
627627
If True, only calculate the voxel-level FWE-corrected maps. Voxel-level correction
628628
can be performed very quickly if the Estimator's ``null_method`` was "montecarlo".
629629
Default is False.

0 commit comments

Comments
 (0)