## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
library(MFF)

## -----------------------------------------------------------------------------
split <- mff_split(train = 1:15, validation = 16:23, test = 24:31)
pool <- boot_train(Volume ~ Girth + Height, datasets::trees, split,
                   times = 6, control = mff_control(seed = 8))
fit <- tune_mff(pool, clusters = 2:3, method = "kmeans")
evaluate(predict(fit, pool), test_observed(pool))

