basisprod: Product Radial Basis Function

View source: R/src.r

basisprodR Documentation

Product Radial Basis Function

Description

This is a function to product the output for the rbfunc function with data matrix for a dimension reduction.

Usage

basisprod(A, B)

Arguments

A

a list or a matrix correponding to the output for the rbfunc function with the argument hispec=FALSE or data matrix, respectivey.

B

a list or a matrix.

Details

basisprod requires one list and one matrix.

Examples


imagedim1=c(10,10,10)

B1 = rbfunc(imagedim=imagedim1, seppix=4, hispec=TRUE)
B2 = rbfunc(imagedim=imagedim1, seppix=4, hispec=FALSE)

n = 50
S = matrix(rnorm(n*prod(imagedim1)), nrow = n, ncol = prod(imagedim1))

SB1 = S %*% B1
SB12 = tcrossprod(S, t(B1))
all(SB1-SB12 == 0)

SB2 = basisprod(S, B2)
all(SB1-SB2 == 0)

BS1 = t(B1) %*% t(S)
BS2 = basisprod(B2, S)
all(BS1-t(BS2) == 0)


mand documentation built on Sept. 13, 2023, 1:06 a.m.