tests/testthat/regression/custom-dist.R

context("    Custom proxy distance with dtwclust")

# =================================================================================================
# setup
# =================================================================================================

## Original objects in env
ols <- ls()

# =================================================================================================
# centroids
# =================================================================================================

with(persistent, {
    test_that("A custom distance in dtwclust give the same results as references.", {
        skip_on_cran()

        expect_known_value(pc_ndtw, file_name(pc_ndtw), info = "nDTW")
        expect_known_value(pc_ndtw_sym, file_name(pc_ndtw_sym), info = "Symmetric nDTW")
        expect_known_value(pc_ndtw_par, file_name(pc_ndtw_par), info = "Params with nDTW")
    })
})

# =================================================================================================
# clean
# =================================================================================================
rm(list = setdiff(ls(), ols))

Try the dtwclust package in your browser

Any scripts or data that you put into this service are public.

dtwclust documentation built on March 7, 2023, 7:49 p.m.