Skip to content

Commit

Permalink
fix: fix showplot check for dbscanfpc and fix bracket for dbscan
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Feb 5, 2024
1 parent d90e4d2 commit 07290b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/LearnerClustDBSCAN.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LearnerClustDBSCAN = R6Class("LearnerClustDBSCAN",
eps = p_dbl(lower = 0, tags = c("required", "train")),
minPts = p_int(lower = 0L, default = 5L, tags = "train"),
borderPoints = p_lgl(default = TRUE, tags = "train"),
weights = p_uty(tags = "train"), custom_check = crate(check_numeric),
weights = p_uty(tags = "train", custom_check = crate(check_numeric)),
search = p_fct(levels = c("kdtree", "linear", "dist"), default = "kdtree", tags = "train"),
bucketSize = p_int(lower = 1L, default = 10L, tags = "train"),
splitRule = p_fct(levels = c("STD", "MIDPT", "FAIR", "SL_MIDPT", "SL_FAIR", "SUGGEST"), default = "SUGGEST", tags = "train"),
Expand Down
2 changes: 1 addition & 1 deletion R/LearnerClustDBSCANfpc.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LearnerClustDBSCANfpc = R6Class("LearnerClustDBSCANfpc",
method = p_fct(levels = c("hybrid", "raw", "dist"), tags = "train"),
seeds = p_lgl(default = TRUE, tags = "train"),
showplot = p_uty(default = FALSE, tags = "train", custom_check = crate(function(x) {
if (test_flag(x) && test_int(x, lower = 0, upper = 2)) {
if (test_flag(x) || test_int(x, lower = 0, upper = 2)) {
TRUE
} else {
"`showplot` need to be either logical or integer between 0 and 2"
Expand Down

0 comments on commit 07290b4

Please sign in to comment.