Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] update ICA to sklearn from mdp #44

Merged
merged 15 commits into from
Nov 13, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Resolve merge conflicts
  • Loading branch information
emdupre committed May 17, 2018
commit a16fd1c886c4e3d164e4ba3313aa3caefcd3fefa
52 changes: 0 additions & 52 deletions tedana/cli/run_tedana.py
Original file line number Diff line number Diff line change
@@ -98,58 +98,6 @@ def get_parser():
help=('Combination scheme for TEs: '
't2s (Posse 1999, default), ste (Poser)'),
default='t2s')
parser.add_argument('--initcost',
dest='initcost',
action='store',
choices=['tanh', 'pow3', 'gaus', 'skew'],
help=('Initial cost function for ICA.'),
default='tanh')
parser.add_argument('--finalcost',
dest='finalcost',
action='store',
choices=['tanh', 'pow3', 'gaus', 'skew'],
help=('Final cost function for ICA. Same options as '
'initcost.'),
default='tanh')
parser.add_argument('--denoiseTEs',
dest='dne',
action='store_true',
help='Denoise each TE dataset separately.',
default=False)
parser.add_argument('--strict',
dest='strict',
action='store_true',
help='Ignore low-variance ambiguous components',
default=False)
parser.add_argument('--no_gscontrol',
dest='no_gscontrol',
action='store_true',
help='Control global signal using spatial approach',
default=False)
parser.add_argument('--kdaw',
dest='kdaw',
help=('Dimensionality augmentation weight (Kappa). '
'Default 10. -1 for low-dimensional ICA'),
default=10.)
parser.add_argument('--rdaw',
dest='rdaw',
help=('Dimensionality augmentation weight (Rho). '
'Default 1. -1 for low-dimensional ICA'),
default=1.)
parser.add_argument('--conv',
dest='conv',
help='Convergence limit. Default 2.5e-5',
default='2.5e-5')
parser.add_argument('--sourceTEs',
dest='ste',
help=('Source TEs for models. ex: -ste 0 for all, '
'-1 for opt. com. Default -1.'),
default=-1)
parser.add_argument('--combmode',
dest='combmode',
help=('Combination scheme for TEs: '
't2s (Posse 1999, default), ste (Poser)'),
default='t2s')
parser.add_argument('--denoiseTEs',
dest='dne',
action='store_true',
15 changes: 10 additions & 5 deletions tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
@@ -25,11 +25,11 @@
"""


def main(data, tes, mixm=None, ctab=None, manacc=None, strict=False,
no_gscontrol=False, kdaw=10., rdaw=1., conv=2.5e-5, ste=-1,
combmode='t2s', dne=False, cost='tanh',
stabilize=False, fout=False, filecsdata=False, label=None,
fixed_seed=42):
def tedana(data, tes, mixm=None, ctab=None, manacc=None, strict=False,
gscontrol=True, kdaw=10., rdaw=1., conv=2.5e-5, ste=-1,
combmode='t2s', dne=False, cost='logcosh',
stabilize=False, fout=False, filecsdata=False, label=None,
fixed_seed=42, debug=False, quiet=False):
"""
Run the "canonical" TE-Dependent ANAlysis workflow.

@@ -157,7 +157,12 @@ def main(data, tes, mixm=None, ctab=None, manacc=None, strict=False,
n_components, dd = decomposition.tedpca(catd, OCcatd, combmode, mask, t2s, t2sG,
stabilize, ref_img,
tes=tes, kdaw=kdaw, rdaw=rdaw, ste=ste)
<<<<<<< HEAD
mmix_orig = decomposition.tedica(n_components, dd, conv, fixed_seed, cost=cost)
=======
mmix_orig = decomposition.tedica(n_components, dd, conv, fixed_seed, cost=initcost,
final_cost=finalcost, verbose=debug)
>>>>>>> upstream/master
tsalo marked this conversation as resolved.
Show resolved Hide resolved
np.savetxt(op.join(out_dir, '__meica_mix.1D'), mmix_orig)
LGR.info('Making second component selection guess from ICA results')
seldict, comptable, betas, mmix = model.fitmodels_direct(catd, mmix_orig,
You are viewing a condensed version of this merge commit. You can view the full changes here.