File: test_cluster_dbscan.R

package info (click to toggle)
r-cran-mlr 2.19.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,392 kB
  • sloc: ansic: 65; sh: 13; makefile: 5
file content (20 lines) | stat: -rwxr-xr-x 516 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

test_that("cluster_dbscan", {
  requirePackagesOrSkip("fpc", default.method = "load")

  parset.list = list(
    list()
  )
  old.predicts.list = list()

  for (i in seq_along(parset.list)) {
    parset = parset.list[[i]]
    m = fpc::dbscan(noclass.train, eps = 1)
    p = as.integer(predict(m, noclass.train, newdata = noclass.test))
    p[p == 0] = NA
    old.predicts.list[[i]] = p
  }

  testSimpleParsets("cluster.dbscan", noclass.df, character(0L),
    noclass.train.inds, old.predicts.list, parset.list)
})