def test_pearson():
    ' Validate pearson correlation'
    X = np.asarray([[1, 2], [(- 2), 8], [3, 5]])
    y = np.asarray([(- 1), (- 2), 0])
    (rs_pearson, ps_pearson) = f_pearson(X, y)
    nose.tools.assert_almost_equal(0.07318639504032803, ps_pearson[0], delta=1e-06)
    nose.tools.assert_almost_equal(0.6666666666666666, ps_pearson[1], delta=1e-06)
    nose.tools.assert_almost_equal(0.993399267799, rs_pearson[0], delta=1e-06)
    nose.tools.assert_almost_equal((- 0.5), rs_pearson[1], delta=1e-06)
Validate pearson correlation
def test_pearson():
    ' '
    X = np.asarray([[1, 2], [(- 2), 8], [3, 5]])
    y = np.asarray([(- 1), (- 2), 0])
    (rs_pearson, ps_pearson) = f_pearson(X, y)
    nose.tools.assert_almost_equal(0.07318639504032803, ps_pearson[0], delta=1e-06)
    nose.tools.assert_almost_equal(0.6666666666666666, ps_pearson[1], delta=1e-06)
    nose.tools.assert_almost_equal(0.993399267799, rs_pearson[0], delta=1e-06)
    nose.tools.assert_almost_equal((- 0.5), rs_pearson[1], delta=1e-06)