diff --git a/DESCRIPTION b/DESCRIPTION index 55564b1..f49d5ab 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ Depends: R (>= 3.6) Imports: cli (>= 3.0.0), - dials (>= 1.1.0), + dials (>= 1.3.0), dplyr (>= 1.0.9), flexclust (>= 1.3-6), foreach, diff --git a/R/arguments.R b/R/arguments.R index 0c2df94..5b88b0c 100644 --- a/R/arguments.R +++ b/R/arguments.R @@ -101,7 +101,7 @@ set_args.cluster_spec <- function(object, ...) { #' @inheritParams parsnip::set_mode #' @return An updated [`cluster_spec`] object. #' @export -set_mode.cluster_spec <- function(object, mode) { +set_mode.cluster_spec <- function(object, mode, ...) { cls <- class(object)[1] if (rlang::is_missing(mode)) { spec_modes <- rlang::env_get( diff --git a/R/tune_cluster.R b/R/tune_cluster.R index 8968083..d46db5c 100644 --- a/R/tune_cluster.R +++ b/R/tune_cluster.R @@ -1066,7 +1066,7 @@ check_grid <- function(grid, workflow, pset = NULL) { } check_workflow(workflow, pset = pset, check_dials = TRUE) - grid <- dials::grid_latin_hypercube(pset, size = grid) + grid <- dials::grid_space_filling(pset, size = grid) grid <- dplyr::distinct(grid) } diff --git a/man/set_args.cluster_spec.Rd b/man/set_args.cluster_spec.Rd index a9143d2..d36e8a9 100644 --- a/man/set_args.cluster_spec.Rd +++ b/man/set_args.cluster_spec.Rd @@ -7,7 +7,7 @@ \method{set_args}{cluster_spec}(object, ...) } \arguments{ -\item{object}{A model specification.} +\item{object}{A \link[parsnip:model_spec]{model specification}.} \item{...}{One or more named model arguments.} } diff --git a/man/set_engine.cluster_spec.Rd b/man/set_engine.cluster_spec.Rd index cfd1412..f0600ff 100644 --- a/man/set_engine.cluster_spec.Rd +++ b/man/set_engine.cluster_spec.Rd @@ -7,7 +7,7 @@ \method{set_engine}{cluster_spec}(object, engine, ...) } \arguments{ -\item{object}{A model specification.} +\item{object}{A \link[parsnip:model_spec]{model specification}.} \item{engine}{A character string for the software that should be used to fit the model. This is highly dependent on the type diff --git a/man/set_mode.cluster_spec.Rd b/man/set_mode.cluster_spec.Rd index 5c62002..03d6b7d 100644 --- a/man/set_mode.cluster_spec.Rd +++ b/man/set_mode.cluster_spec.Rd @@ -4,13 +4,15 @@ \alias{set_mode.cluster_spec} \title{Change mode of a cluster specification} \usage{ -\method{set_mode}{cluster_spec}(object, mode) +\method{set_mode}{cluster_spec}(object, mode, ...) } \arguments{ -\item{object}{A model specification.} +\item{object}{A \link[parsnip:model_spec]{model specification}.} \item{mode}{A character string for the model type (e.g. "classification" or "regression")} + +\item{...}{One or more named model arguments.} } \value{ An updated \code{\link{cluster_spec}} object. diff --git a/tests/testthat/_snaps/tune_cluster.md b/tests/testthat/_snaps/tune_cluster.md index ecd4ede..64be851 100644 --- a/tests/testthat/_snaps/tune_cluster.md +++ b/tests/testthat/_snaps/tune_cluster.md @@ -113,17 +113,14 @@ Condition Warning: The `...` are not used in this function but one or more objects were passed: 'something' - Warning: - `grid_latin_hypercube()` was deprecated in dials 1.3.0. - i Please use `grid_space_filling()` instead. Output # Tuning results # 2-fold cross-validation # A tibble: 2 x 4 splits id .metrics .notes - 1 Fold1 - 2 Fold2 + 1 Fold1 + 2 Fold2 # select_best() and show_best() works diff --git a/tidyclust.Rproj b/tidyclust.Rproj index 7f1b52b..ee85d21 100644 --- a/tidyclust.Rproj +++ b/tidyclust.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: 7aa6e982-3f23-4734-8da7-2ab97b3d66a5 RestoreWorkspace: No SaveWorkspace: No