Skip to contents

Uses caret::train with search = "random".

Usage

morie_random_search_cv(
  x,
  y,
  method = NULL,
  n_iter = 20L,
  cv = 5L,
  task = "auto",
  seed = 0L,
  deterministic_seed = NULL
)

Arguments

x

Numeric predictor matrix.

y

Response.

method

caret method id (default by task).

n_iter

Number of random draws.

cv

CV folds.

task

"auto" / "classification" / "regression".

seed

RNG seed.

deterministic_seed

Integer or NULL. If supplied, the RNG state is derived from the SHA-keyed morie_det_rng() so Py<->R streams agree on the canonical fixture. When NULL (default), behaviour is unchanged: seed drives set.seed() directly.

Value

Named list: estimate, best_params, best_score, sampled_params, sampled_scores, n_iter, task, n, method.

Examples

# See the package vignettes for usage examples:
#   vignette(package = "rmorie")