R/helper_weka.R

Defines functions unmarshal_model.Weka_clusterer_marshaled marshal_model.Weka_clusterer weka_control

weka_control = function(pv) {
  names(pv) = chartr("_", "-", names(pv))
  invoke(RWeka::Weka_control, .args = pv)
}

#' @export
marshal_model.Weka_clusterer = function(model, inplace = FALSE, ...) {
  rJava::.jcache(model$clusterer)
  set_class(
    list(marshaled = model, packages = c("mlr3", "mlr3cluster", "RWeka")),
    c("Weka_clusterer_marshaled", "marshaled")
  )
}

#' @export
unmarshal_model.Weka_clusterer_marshaled = function(model, inplace = FALSE, ...) {
  model$marshaled
}

Try the mlr3cluster package in your browser

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

mlr3cluster documentation built on Aug. 22, 2026, 1:07 a.m.