Example #1
0
def scale(data_matrix):
    """returns the mean and standard deviations of each column"""
    num_rows, num_cols = algebra.shape(data_matrix)
    means = [stats.mean(algebra.get_column(data_matrix, j))
             for j in range(num_cols)]

    stddevs = [stats.standard_deviation(algebra.get_column(data_matrix, j))
               for j in range(num_cols)]
    return means, stddevs
Example #2
0
def scale(data_matrix):
    """returns the mean and standard deviations of each column"""
    num_rows, num_cols = algebra.shape(data_matrix)
    means = [
        stats.mean(algebra.get_column(data_matrix, j)) for j in range(num_cols)
    ]

    stddevs = [
        stats.standard_deviation(algebra.get_column(data_matrix, j))
        for j in range(num_cols)
    ]
    return means, stddevs
Example #3
0
 def matrix_entry(i, j):
     return stats.correlation(algebra.get_column(data, i),
                              algebra.get_column(data, j))
Example #4
0
 def matrix_entry(i, j):
     return stats.correlation(algebra.get_column(data, i),
                              algebra.get_column(data, j))