Ejemplo n.º 1
0
def test_return_conf_cor_mat():
    """compute weighted correlation matrices"""
    # TODO find a real assert test...
    resid_mat = regress_parameters(ts_mat, ts_covar)
    filt_mat = filter_data(resid_mat)
    norm_mat = normalize_data(filt_mat)
    weight_vect = np.ones(time_length)
    res = return_conf_cor_mat(norm_mat, weight_vect)
    print(res)
Ejemplo n.º 2
0
def test_spearmanr_by_hand():
    """test corres matrix based on coords"""
    # TODO find a real assert test...
    """compute weighted correlation matrices"""
    # TODO find a real assert test...
    resid_mat = regress_parameters(ts_mat, ts_covar)
    filt_mat = filter_data(resid_mat)
    norm_mat = normalize_data(filt_mat)

    rho_mat, pval_mat = spearmanr_by_hand(norm_mat)
    print(rho_mat, pval_mat)
Ejemplo n.º 3
0
def test_regress_parameters():
    """test regress_parameters"""
    reg_mat = regress_parameters(ts_mat, ts_covar)
    assert np.all(reg_mat.shape == ts_mat.shape)