File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1943,6 +1943,7 @@ def isc(
19431943 tail = 2 ,
19441944 n_jobs = - 1 ,
19451945 random_state = None ,
1946+ sim_metric = "correlation" ,
19461947):
19471948 """Compute pairwise intersubject correlation from observations by subjects array.
19481949
@@ -1981,6 +1982,7 @@ def isc(
19811982 tail: (int) either 1 for one-tail or 2 for two-tailed test (default: 2)
19821983 n_jobs: (int) The number of CPUs to use to do the computation. -1 means all CPUs.
19831984 return_null: (bool) Return the permutation distribution along with the p-value; default False
1985+ sim_metric: (str) pairwise distance metric. See sklearn's pairwise_distances for valid inputs (default: correlation)
19841986
19851987 Returns:
19861988 stats: (dict) dictionary of permutation results ['correlation','p']
@@ -2000,7 +2002,7 @@ def isc(
20002002 stats = {"isc" : _compute_isc (data , metric = metric )}
20012003
20022004 similarity = Adjacency (
2003- 1 - pairwise_distances (data .T , metric = "correlation" ), matrix_type = "similarity"
2005+ 1 - pairwise_distances (data .T , metric = sim_metric ), matrix_type = "similarity"
20042006 )
20052007
20062008 if method == "bootstrap" :
You can’t perform that action at this time.
0 commit comments