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)
Beispiel #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)
def test_normalize_data():
    """test normalize time series"""
    norm_mat = normalize_data(ts_mat)
    assert np.all(norm_mat.shape == ts_mat.shape)