test_that("`root_mean_squared_error()` works", {
out <- root_mean_squared_error(o = runif(10), p = runif(10))
expect_true(!is.na(out) == TRUE)
out <- root_mean_squared_error(o = runif(10), p = runif(10))
expect_named(out, "rmse")
expect_true(!is.na(out) == TRUE)
out <- root_mean_squared_error(o = runif(10), p = runif(10), normalization = "iq")
expect_named(out, "iq")
expect_true(!is.na(out) == TRUE)
out <- root_mean_squared_error(o = runif(10), p = runif(10), normalization = "mean")
expect_named(out, "mean")
expect_true(!is.na(out) == TRUE)
out <- root_mean_squared_error(o = runif(10), p = runif(10), normalization = "sd")
expect_named(out, "sd")
expect_true(!is.na(out) == TRUE)
out <- root_mean_squared_error(o = runif(10), p = runif(10), normalization = "maxmin")
expect_named(out, "maxmin")
expect_true(!is.na(out) == TRUE)
out <- root_mean_squared_error(o = runif(10), p = runif(10), normalization = "all")
expect_named(out, c("rmse", "iq", "maxmin", "mean", "sd"))
expect_true(sum(!is.na(out)) == 5)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.