Skip to content

Commit

Permalink
[TEST] Minor smoke test for missing data
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarkello committed Nov 4, 2019
1 parent 6bd5ab8 commit 4fbd403
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pyls/tests/types/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ def test_regression_3dbootstrap(aggfunc):
bootsamples=bootsamples, n_boot=10)


def test_regression_missingdata():
X = rs.rand(subj, Xf)
X[10] = np.nan
PLSRegressionTests(X=X, n_components=2)
X[20] = np.nan
PLSRegressionTests(X=X, n_components=2)
Y = rs.rand(subj, Yf)
Y[11] = np.nan
PLSRegressionTests(X=X, Y=Y, n_components=2)


def test_errors():
with pytest.raises(ValueError):
PLSRegressionTests(n_components=1000)
Expand Down

0 comments on commit 4fbd403

Please sign in to comment.