From 329f649c5cd565ada5e5e6cc7292dfef9df4cccb Mon Sep 17 00:00:00 2001 From: Sam <119359217+srken32@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:07:28 -0400 Subject: [PATCH] added similarity metric keyword to stats.isc (defaults to correlation) --- nltools/stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nltools/stats.py b/nltools/stats.py index 7e93afbb..d3c04648 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. @@ -2000,7 +2001,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":