def test_bias():
    '\n    make sure we get the same result for setting C=unitvec\n    '
    (S, y) = get_example_data()
    C = np.ones((len(y), 1))
    from sklearn.feature_selection import f_regression
    (F1, pval1) = f_regression(S, y, center=True)
    (F2, pval2) = f_regression_cov(S, C, y)
    (F3, pval3) = f_regression_cov_alt(S, C, y)
    np.testing.assert_array_almost_equal(F1, F2)
    np.testing.assert_array_almost_equal(F2, F3)
    np.testing.assert_array_almost_equal(pval1, pval2)
    np.testing.assert_array_almost_equal(pval2, pval3)
make sure we get the same result for setting C=unitvec
def test_bias():
    '\n    \n    '
    (S, y) = get_example_data()
    C = np.ones((len(y), 1))
    from sklearn.feature_selection import f_regression
    (F1, pval1) = f_regression(S, y, center=True)
    (F2, pval2) = f_regression_cov(S, C, y)
    (F3, pval3) = f_regression_cov_alt(S, C, y)
    np.testing.assert_array_almost_equal(F1, F2)
    np.testing.assert_array_almost_equal(F2, F3)
    np.testing.assert_array_almost_equal(pval1, pval2)
    np.testing.assert_array_almost_equal(pval2, pval3)