coef_img: coefficient image

Description Usage Arguments Value Author(s) References Examples

View source: R/admm_nmr.R View source: R/fast_admm_nmr.R

Description

This function performs linear combination of train images.

Usage

1
  coef_img(A, x)

Arguments

A

"A" is a train data set in the form of a three-dimensional array. This data set contains several face images used for algorithm learning.

x

"x" is a coefficient vector for the train images.

Value

A_x

"A_x" is a result obtained by correlation coefficient x with A, a test image data set.

Author(s)

Jisun Kang

References

https://ieeexplore.ieee.org/document/7420697

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
function (A, x)
{
    p <- dim(A)[1]
    q <- dim(A)[2]
    n <- dim(A)[3]
    A_x <- matrix(rep(0, p * q), dim = c(p, q))
    for (i in 1:n) {
        A_x <- A_x + x[i] * A[, , i]
    }
    return(A_x)
  }

riverKangg/NuclearNormClassifier documentation built on Jan. 1, 2020, 10:08 p.m.