R/RcppExports.R

Defines functions ic_rank cv_rank kkt_fix trun_svd biscale_alt vec2mat

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

vec2mat <- function(x, type, num) {
    .Call(`_eimpute_vec2mat`, x, type, num)
}

biscale_alt <- function(x, ind, obsrow, obscol, max_it, tol, alpha, beta, tau, gamma, row_mean, col_mean, row_std, col_std) {
    .Call(`_eimpute_biscale_alt`, x, ind, obsrow, obscol, max_it, tol, alpha, beta, tau, gamma, row_mean, col_mean, row_std, col_std)
}

trun_svd <- function(X, k) {
    .Call(`_eimpute_trun_svd`, X, k)
}

#' @noRd
#' @param omega The matrix index of the observed value
#' @param noise the noise matrix
#' @param X The obeserved value of the matrix
#' @param m, n The dimension of the matrix
#' @param rank The rank of matrix
#' @param max_it	 maximum number of iterations.
#' @param tol convergence threshold, measured as the relative change in the Frobenius norm between two successive estimates.
#' @param type computing singular value decomposition, 1 is truncated singular value decomposition, 2 is randomized singular value decomposition
#' @param init whether to initialize or not.
#' @description Use Rcpp to fit a low-rank matrix approximation to a matrix with two method computing singular value decomposition.
kkt_fix <- function(omega, noise, X, m, n, rank, max_it, tol, type, init) {
    .Call(`_eimpute_kkt_fix`, omega, noise, X, m, n, rank, max_it, tol, type, init)
}

#' @noRd
#' @param omega The matrix index of the observed value
#' @param noise the noise matrix
#' @param X The obeserved value of the matrix
#' @param m, n The dimension of the matrix
#' @param r_min The start rank for searching
#' @param r.max the max rank for searching.
#' @param n_fold number of folds in cross validation
#' @param max_it	maximum number of iterations.
#' @param tol convergence threshold, measured as the relative change in the Frobenius norm between two successive estimates.
#' @param type computing singular value decomposition, 1 is truncated singular value decomposition, 2 is randomized singular value decomposition
#' @param init whether to initialize or not.
#' @description Use Rcpp to search rank with cross validation.
cv_rank <- function(omega, noise, X, m, n, r_min, r_max, n_fold, max_it, tol, type, init) {
    .Call(`_eimpute_cv_rank`, omega, noise, X, m, n, r_min, r_max, n_fold, max_it, tol, type, init)
}

#' @noRd
#' @param omega The matrix index of the observed value
#' @param noise the noise matrix
#' @param X The obeserved value of the matrix
#' @param m, n The dimension of the matrix
#' @param r_min The start rank for searching
#' @param r.max the max rank for searching.
#' @param max_it	 maximum number of iterations.
#' @param tol convergence threshold, measured as the relative change in the Frobenius norm between two successive estimates.
#' @param type computing singular value decomposition, 1 is truncated singular value decomposition, 2 is randomized singular value decomposition
#' @param init whether to initialize or not.
#' @description Use Rcpp to search rank with information criterion rule.
ic_rank <- function(omega, noise, X, m, n, r_min, r_max, max_it, tol, type, init) {
    .Call(`_eimpute_ic_rank`, omega, noise, X, m, n, r_min, r_max, max_it, tol, type, init)
}

Try the eimpute package in your browser

Any scripts or data that you put into this service are public.

eimpute documentation built on Oct. 22, 2022, 9:05 a.m.