from tedana import model, utils, io from tedana.decomposition._utils import eimask, dwtmat, idwtmat from tedana.selection._utils import (getelbow_cons, getelbow) from tedana.due import due, BibTeX LGR = logging.getLogger(__name__) F_MAX = 500 Z_MAX = 8 @due.dcite(BibTeX(""" @inproceedings{minka2001automatic, title={Automatic choice of dimensionality for PCA}, author={Minka, Thomas P}, booktitle={Advances in neural information processing systems}, pages={598--604}, year={2001} } """), description='Introduces method for choosing PCA dimensionality ' 'automatically') def run_svd(data): """ Run Singular Value Decomposition (SVD) on input data. Parameters ---------- data : (S [*E] x T) array_like Optimally combined (S x T) or full multi-echo (S*E x T) data.
Returns ------- out : (S [x E [x T]]) :obj:`numpy.ndarray` Unmasked `data` array """ out = np.zeros(mask.shape + data.shape[1:], dtype=data.dtype) out[mask] = data return out @due.dcite(BibTeX('@article{dice1945measures,' 'author={Dice, Lee R},' 'title={Measures of the amount of ecologic association between species},' 'year = {1945},' 'publisher = {Wiley Online Library},' 'journal = {Ecology},' 'volume={26},' 'number={3},' 'pages={297--302}}'), description='Introduction of Sorenson-Dice index by Dice in 1945.') @due.dcite(BibTeX('@article{sorensen1948method,' 'author={S{\\o}rensen, Thorvald},' 'title={A method of establishing groups of equal amplitude ' 'in plant sociology based on similarity of species and its ' 'application to analyses of the vegetation on Danish commons},' 'year = {1948},' 'publisher = {Wiley Online Library},' 'journal = {Biol. Skr.},' 'volume={5},' 'pages={1--34}}'),
if add_const: # drop beta for intercept, if specified betas = betas[:, :-1] if mask is not None: betas = utils.unmask(betas, mask) return betas @due.dcite(BibTeX(""" @article{hughett2007accurate, title={Accurate Computation of the F-to-z and t-to-z Transforms for Large Arguments}, author={Hughett, Paul}, journal={Journal of Statistical Software}, volume={23}, number={1}, pages={1--5}, year={2007}, publisher={Foundation for Open Access Statistics} } """), description='Introduces T-to-Z transform.') @due.dcite(Doi('10.5281/zenodo.32508'), description='Python implementation of T-to-Z transform.') def t_to_z(t_values, dof): """ Convert t-values to z-values. Parameters ----------