diff --git a/nltools/stats.py b/nltools/stats.py index 7e93afbb..fec0415c 100644 --- a/nltools/stats.py +++ b/nltools/stats.py @@ -1943,6 +1943,7 @@ def isc( tail=2, n_jobs=-1, random_state=None, + sim_metric="correlation", ): """Compute pairwise intersubject correlation from observations by subjects array. @@ -1981,6 +1982,7 @@ def isc( tail: (int) either 1 for one-tail or 2 for two-tailed test (default: 2) n_jobs: (int) The number of CPUs to use to do the computation. -1 means all CPUs. return_null: (bool) Return the permutation distribution along with the p-value; default False + sim_metric: (str) pairwise distance metric. See sklearn's pairwise_distances for valid inputs (default: correlation) Returns: stats: (dict) dictionary of permutation results ['correlation','p'] @@ -2000,7 +2002,7 @@ def isc( stats = {"isc": _compute_isc(data, metric=metric)} similarity = Adjacency( - 1 - pairwise_distances(data.T, metric="correlation"), matrix_type="similarity" + 1 - pairwise_distances(data.T, metric=sim_metric), matrix_type="similarity" ) if method == "bootstrap":