Learn R Programming

RMCLab (version 0.1.0)

get_nb_iter: Extract the number of iterations

Description

Extract the number of iterations from an object returned by a matrix completion algorithm.

Usage

get_nb_iter(object, ...)

# S3 method for rdmc_tuned get_nb_iter(object, ...)

# S3 method for rdmc get_nb_iter(object, ...)

Value

The number of iterations performed in the iterative algorithm.

Arguments

object

an object returned by an iterative matrix completion algorithm.

...

currently ignored.

Author

Andreas Alfons

See Also

rdmc_tune()

Examples

Run this code
# 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 number of iterations with optimal regularization parameter
get_nb_iter(fit)

Run the code above in your browser using DataLab