Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
BahmanTahayori committed Nov 29, 2023
1 parent 4714baf commit da1b128
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 36 additions & 1 deletion .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tedana/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DEFAULT_ICA_METHOD = "robustica"
DEFAULT_N_ROBUST_RUNS = 30
DEFAULT_N_MAX_ITER = 500
DEFAULT_N_MAX_RESTART = 10
DEFAULT_N_MAX_RESTART = 10
DEFAULT_SEED = 42
4 changes: 2 additions & 2 deletions tedana/decomposition/ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def tedica(

ica_method = ica_method.lower()

if ica_method == "robustica":
if ica_method == "robustica": ##The issue with fixed seed in robustica was resolved, see https://github.com/CRG-CNAG/robustica/issues/3
mmix, fixed_seed = r_ica(
data,
n_components=n_components,
Expand All @@ -91,7 +91,7 @@ def tedica(

def r_ica(data, n_components, fixed_seed, n_robust_runs, max_it):
"""
Perform robustica on `data` by running FastICA multiple times (n_robust runes)
Perform robustica on `data` by running FastICA multiple times (n_robust_runs)
and returns mixing matrix
Parameters
Expand Down
10 changes: 6 additions & 4 deletions tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
DEFAULT_N_MAX_ITER,
DEFAULT_N_MAX_RESTART,
DEFAULT_N_ROBUST_RUNS,
DEFAULT_SEED
)
from tedana.stats import computefeats2
from tedana.workflows.parser_utils import check_tedpca_value, is_valid_file
Expand Down Expand Up @@ -190,10 +191,11 @@ def _get_parser():
help=(
"Value used for random initialization of ICA "
"algorithm. Set to an integer value for "
"reproducible ICA results (fastica/robustica). Set to -1 for "
"varying results across ICA (fastica/robustica) calls. "
"reproducible ICA results. Set to -1 for "
"varying results across ICA calls. This"
"applies to both fastica and robustica methods."
),
default=42,
default=DEFAULT_SEED,
)
optional.add_argument(
"--n_robust_runs",
Expand Down Expand Up @@ -356,7 +358,7 @@ def tedana_workflow(
ica_method=DEFAULT_ICA_METHOD,
n_robust_runs=DEFAULT_N_ROBUST_RUNS,
tedpca="aic",
fixed_seed=42,
fixed_seed=DEFAULT_SEED,
maxit=DEFAULT_N_MAX_ITER,
maxrestart=DEFAULT_N_MAX_RESTART,
tedort=False,
Expand Down

0 comments on commit da1b128

Please sign in to comment.