# toy example derived from MovieLens 100K dataset
data("MovieLensToy")
# robust discrete matrix completion with hyperparameter tuning
set.seed(20250723)
fit <- rdmc_tune(MovieLensToy,
lambda = fraction_grid(nb_lambda = 6),
splits = holdout_control(R = 5))
# extract completed matrix with optimal regularization parameter
X_hat <- get_completed(fit)
head(X_hat)
# for more examples, see the help files of other functions for
# matrix completion and imputation methods
Run the code above in your browser using DataLab