"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "R/tests/testthat/test_diagnostics.R" between
prophet-1.0.tar.gz and prophet-1.1.tar.gz

About: Prophet is a tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.

test_diagnostics.R  (prophet-1.0):test_diagnostics.R  (prophet-1.1)
skipping to change at line 124 skipping to change at line 124
# test this works ok when periods is NULL # test this works ok when periods is NULL
df.cv <-cross_validation( df.cv <-cross_validation(
m, horizon = 32, units = "days", cutoffs=cutoffs) m, horizon = 32, units = "days", cutoffs=cutoffs)
expect_equal(length(unique(df.cv$cutoff)), 2) expect_equal(length(unique(df.cv$cutoff)), 2)
}) })
test_that("cross_validation_uncertainty_disabled", { test_that("cross_validation_uncertainty_disabled", {
skip_if_not(Sys.getenv('R_ARCH') != '/i386') skip_if_not(Sys.getenv('R_ARCH') != '/i386')
for (uncertainty in c(0, FALSE)) { for (uncertainty in c(0, FALSE)) {
m <- prophet(uncertainty.samples = uncertainty) m <- prophet(uncertainty.samples = uncertainty)
m <- fit.prophet(m = m, df = DATA, algorithm = "Newton") m <- fit.prophet(m = m, df = DATA)
df.cv <- cross_validation( df.cv <- cross_validation(
m, horizon = 4, units = "days", period = 4, initial = 115) m, horizon = 4, units = "days", period = 4, initial = 115)
expected.cols <- c('y', 'ds', 'yhat', 'cutoff') expected.cols <- c('y', 'ds', 'yhat', 'cutoff')
expect_equal(expected.cols, colnames(df.cv)) expect_equal(expected.cols, colnames(df.cv))
df.p <- performance_metrics(df.cv) df.p <- performance_metrics(df.cv)
expect_false('coverage' %in% colnames(df.p)) expect_false('coverage' %in% colnames(df.p))
} }
}) })
test_that("performance_metrics", { test_that("performance_metrics", {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)