Learn R Programming

sgdGMF (version 1.0)

set.control.cv: 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
)

Value

A list of control parameters for the cross-validation algorithm

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)

See Also

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

Examples

Run this code
library(sgdGMF)

# Empty call
set.control.cv()

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

Run the code above in your browser using DataLab