Skip to content

Commit

Permalink
TEST boosting: splitting TRF into early and late should not change re…
Browse files Browse the repository at this point in the history
…sults
  • Loading branch information
christianbrodbeck committed Jul 21, 2021
1 parent af60e4e commit b19221b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eelbrain/_trf/tests/test_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ def test_trf_len(n_workers):
res = boosting(y, x, 0, 0.5, partitions=3)
assert correlation_coefficient(res.h, k) > 0.99
assert repr(res) == '<boosting y ~ x, 0 - 0.5, partitions=3>'
# split the predictor into two complementary time windows (should be identical)
res2 = boosting(y, [x, x], [0.000, 0.250], [0.250, 0.500], partitions=3)
assert_array_equal(res2.h[0] + res2.h[1], res.h)
assert res2.r == res.r

# test multiple tstart, tend
x2 = NDVar(rng.normal(0, 1, 1000), UTS(0, 0.1, 1000), name='x2')
Expand Down

0 comments on commit b19221b

Please sign in to comment.