Skip to content

Commit

Permalink
added similarity metric keyword to stats.isc (defaults to correlation)
Browse files Browse the repository at this point in the history
  • Loading branch information
srken32 committed Jul 24, 2024
1 parent e67f266 commit 329f649
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nltools/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 329f649

Please sign in to comment.