conditional_independence.partial_correlation_suffstat

conditional_independence.partial_correlation_suffstat(samples, invert=True) → Dict[source]

Return the sufficient statistics for partial correlation testing.

Parameters
  • samples – (n x p) matrix, where n is the number of samples and p is the number of variables.

  • invert – if True, compute the inverse correlation matrix, and normalize it into the partial correlation matrix. This will generally speed up the gauss_ci_test if large conditioning sets are used.

Returns

dictionary of sufficient statistics

Return type

dict