R/default_fallback.R

Defines functions default_fallback.LearnerClust

#' @export
default_fallback.LearnerClust = function(learner, ...) {
  fallback = lrn("clust.featureless")
  if (learner$predict_type %nin% fallback$predict_types) {
    error_config("Fallback learner '%s' does not support predict type '%s'.", fallback$id, learner$predict_type)
  }
  fallback$predict_type = learner$predict_type
  fallback
}

Try the mlr3cluster package in your browser

Any scripts or data that you put into this service are public.

mlr3cluster documentation built on Sept. 17, 2026, 5:09 p.m.