inner {epca} | R Documentation |
Matrix Inner Product
Description
Calculate the custom matrix inner product z
of two matrices, x
and y
,
where z[i,j] = FUN(x[,i], y[,j])
.
Usage
inner(x, y, FUN = "crossprod", ...)
Arguments
x , y |
|
FUN |
|
... |
additional parameters for |
Value
matrix
, inner product of x
and y
.
Examples
x <- matrix(1:6, 2, 3)
y <- matrix(7:12, 2, 3)
## The default is equivalent to `crossprod(x, y)`
inner(x, y)
## We can compute the pair-wise Euclidean distance of columns.
EuclideanDistance = function(x, y) crossprod(x, y)^2
inner(x, y, EuclideanDistance)
[Package epca version 1.1.0 Index]