Example #1
0
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)
Example #2
0
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)