Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# tidyclust (development version)

* Fixed bug when trying to tune the `linkage_method` argument. (#206, @lgaborini)

# tidyclust 0.2.4

* The philentropy package is now used to calculate distances rather than Rfast. (#199)
Expand Down
2 changes: 1 addition & 1 deletion R/dials-params.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ linkage_method <- function(values = values_linkage_method) {
dials::new_qual_param(
type = "character",
values = values,
label = c(activation = "Linkage Method"),
label = c(linkage_method = "Linkage Method"),
finalize = NULL
)
}
Expand Down
15 changes: 15 additions & 0 deletions tests/testthat/test-hier_clust-stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,18 @@ test_that("extract_cluster_assignment() works", {
expected
)
})

test_that("all parameters are correctly named", {
# fixes issue #206

param_grid <- dials::parameters(
dials::num_clusters(range = c(2, 3)),
linkage_method(),
cut_height(range = c(0, 3))
)

expect_setequal(
param_grid$name,
c("num_clusters", "linkage_method", "cut_height")
)
})