calc_sigma function

Calculate the sigma covariance matrix from a fitted BN or DBN