@@ -261,25 +261,31 @@ class FWECorrector(Corrector):
261261
262262 Parameters
263263 ----------
264- method : :obj:`str`
265- The FWE correction to use. Available internal methods are 'bonferroni'.
266- Additional methods may be implemented within the provided Estimator.
264+ method : {'bonferoni', 'montecarlo'}
265+ The FWE correction to use. Note that the 'montecarlo' method is only available for
266+ a subset of Estimators. To determine what methods are available for the Estimator you're
267+ using, use :meth:`inspect`.
268+ voxel_thresh : :obj:`float`, optional
269+ Only used if ``method='montecarlo'``. The uncorrected voxel-level threshold to use.
270+ n_iters : :obj:`int`, optional
271+ Number of iterations to use for Monte Carlo correction.
272+ Default varies by Estimator.
273+ For publication-quality results, 5000 or more iterations are recommended.
274+ n_cores : :obj:`int`, optional
275+ Number of cores to use for Monte Carlo correction. Default is 1.
267276 **kwargs
268277 Keyword arguments to be used by the FWE correction implementation.
269-
270- Notes
271- -----
272- This corrector supports a small number of internal FWE correction methods, but can also use
273- special methods implemented within individual Estimators.
274- To determine what methods are available for the Estimator you're using, use :meth:`inspect`.
275- Estimators have special methods following the naming convention
276- ``correct_[correction-type]_[method]``
277- (e.g., :func:`~nimare.meta.cbma.ale.ALE.correct_fwe_montecarlo`).
278278 """
279279
280280 _correction_method = "fwe"
281281
282- def __init__ (self , method = "bonferroni" , ** kwargs ):
282+ def __init__ (self , method = "bonferroni" , n_iters = None , n_cores = 1 , ** kwargs ):
283+ if method not in ("bonferroni" , "montecarlo" ):
284+ raise ValueError (f"Unsupported FWE correction method '{ method } '" )
285+
286+ if method == "montecarlo" :
287+ kwargs .update ({"n_iters" : n_iters , "n_cores" : n_cores })
288+
283289 self .method = method
284290 self .parameters = kwargs
285291
0 commit comments