Learn R Programming

kernDeepStackNet (version 2.0.2)

kernDeepStackNet_crossprodRcpp: Calculates the cross product of a matrix

Description

This is an computational efficient help function to calculate the GCV loss of the KDSN. Calculates the matrix product A^T A. It is written in C and faster than the regular R version.

Usage

kernDeepStackNet_crossprodRcpp(A)

Arguments

A

Numeric Matrix. Integer matrices are not allowed.

Value

List with the numeric matrix A^T A as element.

See Also

crossprod

Examples

Run this code
A <- matrix(seq(-1, 1, length.out=9), nrow=3, ncol=3)
crossprodRcpp(A)[[1]]
all.equal(crossprodRcpp(A)[[1]], crossprod(A))

Run the code above in your browser using DataLab