Description Usage Arguments Value Author(s) References Examples
Entering the training data set and the test data returns the optimal label.
1 | admm_nmr_clf(A, B, label)
|
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. |
B |
"B" is an image of a face with occlusion. |
label |
"label" is a vector representing a label for train dataset A. |
val |
The result of classification. It represents the optimal label. |
Jisun Kang
https://ieeexplore.ieee.org/document/7420697
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | function (A, B, label)
{
x <- ADMM_NMR_fit(A, B)
A_x <- coef_img(A, x)
label_unique <- unique(label)
error_lst <- c()
for (i in target_unique) {
label_tf <- (label == label_unique)
x_i <- x[label_tf]
A_i <- A[, , label_tf]
A_x_i <- coef_img(A_i, x_i)
diff <- A_x - A_x_i
error <- nuclear(diff)
error_lst <- append(error_lst, error)
}
error_tf <- error == min(error)
val <- label_unique[error_tf]
return(val)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.