Skip to content

Commit

Permalink
refactor: change back to numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Feb 5, 2024
1 parent b437c0b commit 0db0671
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/LearnerClustAffinityPropagation.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LearnerClustAP = R6Class("LearnerClustAP",
ps = ps(
s = p_uty(tags = c("required", "train")),
p = p_uty(default = NA, tags = "train", custom_check = crate(check_numeric)),
q = p_dbl(lower = 0L, upper = 1L, tags = "train"),
q = p_dbl(lower = 0, upper = 1, tags = "train"),
maxits = p_int(lower = 1L, default = 1000L, tags = "train"),
convits = p_int(lower = 1L, default = 100L, tags = "train"),
lam = p_dbl(lower = 0.5, upper = 1, default = 0.9, tags = "train"),
Expand Down
4 changes: 2 additions & 2 deletions R/LearnerClustCMeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ LearnerClustCMeans = R6Class("LearnerClustCMeans",
verbose = p_lgl(default = FALSE, tags = "train"),
dist = p_fct(levels = c("euclidean", "manhattan"), default = "euclidean", tags = "train"),
method = p_fct(levels = c("cmeans", "ufcl"), default = "cmeans", tags = "train"),
m = p_dbl(lower = 1L, default = 2L, tags = "train"),
rate.par = p_dbl(lower = 0L, upper = 1L, tags = "train"),
m = p_dbl(lower = 1, default = 2, tags = "train"),
rate.par = p_dbl(lower = 0, upper = 1, tags = "train"),
weights = p_uty(default = 1L, tags = "train", custom_check = crate(function(x) {
if (test_numeric(x) && all(x > 0) || check_count(x, positive = TRUE)) {
TRUE
Expand Down

0 comments on commit 0db0671

Please sign in to comment.