Skip to content

Commit

Permalink
[DOC] Warn users about Peaks2MapsKernel and KDA Estimator (#420)
Browse files Browse the repository at this point in the history
* Add warning to Peaks2MapsKernel.

* Add warning to KDA estimator.

* Update nimare/meta/cbma/mkda.py

* Fix KDA warning.
  • Loading branch information
tsalo authored Dec 17, 2020
1 parent acaa849 commit a33c140
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nimare/meta/cbma/mkda.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,12 @@ class KDA(CBMAEstimator):
Available correction methods: :func:`KDA.correct_fwe_montecarlo`
Warning
-------
The KDA algorithm has been replaced in the literature with the MKDA algorithm.
As such, this estimator should almost never be used, outside of systematic
comparisons between algorithms.
References
----------
.. [1] Wager, Tor D., et al. "Valence, gender, and lateralization of
Expand All @@ -476,6 +482,12 @@ class KDA(CBMAEstimator):
def __init__(
self, kernel_transformer=KDAKernel, null_method="empirical", n_iters=10000, **kwargs
):
LGR.warning(
"The KDA algorithm has been replaced in the literature with the MKDA algorithm. "
"As such, this estimator should almost never be used, outside of systematic "
"comparisons between algorithms."
)

if not (isinstance(kernel_transformer, KDAKernel) or kernel_transformer == KDAKernel):
LGR.warning(
f"The KernelTransformer being used ({kernel_transformer}) is not optimized "
Expand Down
9 changes: 9 additions & 0 deletions nimare/meta/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,21 @@ class Peaks2MapsKernel(KernelTransformer):
resample_to_mask : :obj:`bool`, optional
If True, will resample the MA maps to the mask's header.
Default is True.
Warning
-------
Peaks2MapsKernel is not intended for serious research.
We strongly recommend against using it for any meaningful analyses.
"""

def __init__(self, model_dir="auto"):
# Use private attribute to hide value from get_params.
# get_params will find model_dir=None, which is *very important* when a path is provided.
self._model_dir = model_dir
LGR.warning(
"The Peaks2Maps kernel transformer is not intended for serious research. "
"We strongly recommend against using it for any meaningful analyses."
)

def _transform(self, mask, coordinates):
transformed = []
Expand Down

0 comments on commit a33c140

Please sign in to comment.