mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-09-16 22:20:23 +00:00
Add test for MCMC with 0 changepoints (R)
This commit is contained in:
parent
be25372090
commit
9320ed1fb5
1 changed files with 6 additions and 1 deletions
|
|
@ -33,8 +33,13 @@ test_that("fit_predict_no_changepoints", {
|
||||||
expect_warning({
|
expect_warning({
|
||||||
# warning from prophet(), error from predict()
|
# warning from prophet(), error from predict()
|
||||||
m <- prophet(train, n.changepoints = 0)
|
m <- prophet(train, n.changepoints = 0)
|
||||||
expect_error(predict(m, future), NA)
|
|
||||||
})
|
})
|
||||||
|
fcst <- predict(m, future)
|
||||||
|
|
||||||
|
expect_warning({
|
||||||
|
m <- prophet(train, n.changepoints = 0, mcmc.samples = 100)
|
||||||
|
})
|
||||||
|
fcst <- predict(m, future)
|
||||||
})
|
})
|
||||||
|
|
||||||
test_that("fit_predict_changepoint_not_in_history", {
|
test_that("fit_predict_changepoint_not_in_history", {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue