Class Mmap_count_mcovKt
-
- All Implemented Interfaces:
public final class Mmap_count_mcovKt
-
-
Method Summary
Modifier and Type Method Description final static Matrix
mmap_count_mcov(MatrixCell MMAP, Double t)
Computes the count covariance between each pair of classes at a given time scale. final static Matrix
mmap_count_mcov(Array<Matrix> mmap, Double t)
Computes the count covariance between each pair of classes at a given time scale. -
-
Method Detail
-
mmap_count_mcov
final static Matrix mmap_count_mcov(MatrixCell MMAP, Double t)
Computes the count covariance between each pair of classes at a given time scale.
For an MMAP with m classes, this function computes the m x m covariance matrix S where S(i,j) represents the covariance between the count of class i events and class j events over time period t.
The algorithm works as follows:
For diagonal elements: S(i,i) = Var(N_i(t)) (per-class variance)
For off-diagonal elements: S(i,j) = 1/2 * (Var(N_i(t) + N_j(t)) - Var(N_i(t)) - Var(N_j(t)))
This uses the property that for random variables X and Y: Cov(X,Y) = 1/2 * (Var(X+Y) - Var(X) - Var(Y))
- Parameters:
MMAP
- the MMAP represented as a MatrixCell where MMAP0 = D0, MMAP1 = aggregate D1, and MMAP2+i = D_{i+1} for i = 0, 1, ...t
- the time scale over which to compute covariances- Returns:
the m x m covariance matrix between class pairs
-
mmap_count_mcov
final static Matrix mmap_count_mcov(Array<Matrix> mmap, Double t)
Computes the count covariance between each pair of classes at a given time scale. Array-based overload for compatibility with functions expecting Array<Matrix>.
- Parameters:
mmap
- the MMAP represented as Array<Matrix> where mmap0 = D0, mmap1 = D1, mmap2 = D2, ...t
- the time scale over which to compute covariances- Returns:
the m x m covariance matrix between class pairs
-
-
-
-