set.control.cv: Check and set the cross-validation parameters

set.control.cvR Documentation

Check and set the cross-validation parameters

Description

Check if the input cross-validation parameters are allowed and set them to default values if they are not. Returns a list of well-defined cross-validation parameters.

Usage

set.control.cv(
  criterion = c("dev", "mae", "mse", "aic", "bic"),
  refit = TRUE,
  nfolds = 5,
  proportion = 0.3,
  init = c("common", "separate"),
  verbose = FALSE,
  parallel = FALSE,
  nthreads = 1
)

Arguments

criterion

information criterion to minimize for selecting the matrix rank

refit

if TRUE, refit the model with the selected rank and return the fitted model

nfolds

number of cross-validation folds

proportion

proportion of the data to be used as test set in each fold

init

initialization approach to use

verbose

if TRUE, print the cross-validation status

parallel

if TRUE, allows for parallel computing

nthreads

number of cores to use in parallel (only if parallel=TRUE)

Value

A list of control parameters for the cross-validation algorithm

See Also

set.control.init, set.control.alg, sgdgmf.cv

Examples

library(sgdGMF)

# Empty call
set.control.cv()

# Parametrized call
set.control.cv(criterion = "bic", proportion = 0.2)


sgdGMF documentation built on April 3, 2025, 7:37 p.m.