def corrmatrix(mat): """Correlation Matrix""" size = len(mat) return util.list2matrix(map(lambda (i,j): corr(mat[i], mat[j]), util.range2(size, size)), size, size)
def covmatrix(mat): """Covariance Matrix""" size = len(mat) return util.list2matrix(map(lambda (i,j): covariance(mat[i], mat[j]), util.range2(size, size)), size, size)