htfa.isfc

htfa.isfc(weights, window=None)[source]

Inter-subject functional correlation between factors.

For each subject, its factor time courses are correlated with the mean of the other subjects’ time courses; the result is symmetrized as (C + C.T) / 2 and averaged over subjects in Fisher-z space. Factor rows and sample columns must correspond across subjects. For example, movie-viewing data can align samples to the same moments of a shared film. Equal array shapes alone do not establish temporal correspondence; this alignment requirement belongs to ISFC, not to HTFA fitting in general.

Parameters:
weightslist of ndarray, each shape (K, T)

One weight matrix per subject; all must share K and T.

windowint, optional

If given, sliding-window ISFC.

Returns:
ndarray, shape (K, K) or (T - window + 1, K, K)

Examples

>>> import numpy as np
>>> w = np.random.default_rng(0).standard_normal((3, 50))
>>> isfc([w, w + 0.1], window=20).shape
(31, 3, 3)