SparseVFC | R Documentation |
The main function for the SparseVFC algorithm.
See References
for more information.
SparseVFC(
X,
Y,
M = 16,
MaxIter = 500,
gamma = 0.9,
beta = 0.1,
lambda = 3,
theta = 0.75,
a = 10,
ecr = 1e-05,
minP = 1e-05,
silent = TRUE
)
X |
The position of the vectors. |
Y |
The value of the vectors. |
M |
The number of the basis functions used for sparse approximation. Default value is 16. |
MaxIter |
Maximum iteration times. Default value is 500. |
gamma |
Percentage of inliers in the samples. This is an initial value for EM iteration, and it is not important. Default value is 0.9. |
beta |
Parameter of Gaussian Kernel, |
lambda |
Represents the trade-off between the goodness of data fit and smoothness of the field. Default value is 3. |
theta |
If the posterior probability of a sample being an inlier is larger than theta, then it will be regarded as an inlier. Default value is 0.75. |
a |
Parameter of the uniform distribution. We assume that the outliers obey a uniform distribution |
ecr |
The minimum limitation of the energy change rate in the iteration process. Default value is 1e-5. |
minP |
The posterior probability Matrix P may be singular for matrix inversion. We set the minimum value of P as |
silent |
Should the messages be suppressed? Default value is |
A VFC
object, which is a list containing the following elements:
A matrix of the positions of kernels.
A matrix of the input vectors.
The input value of beta
.
A matrix of the estimated vectors.
A matrix of the coefficients of each kernel.
A vector of the posterior probability of the input vectors (Y
) being an inlier.
A vector of indices of the inliers.
The \sigma^2
of the estimations weighted by P
.
The algorithm is described in Ma et al. (2013) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.patcog.2013.05.017")}. This function is translated with permission from Jiayi Ma's Matlab function at https://github.com/jiayi-ma/VFC. Also see Zhao et al. (2011) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1109/CVPR.2011.5995336")} for the earlier VFC algorithm.
data(church)
set.seed(1614)
VecFld <- SparseVFC(norm_vecs(church$X), norm_vecs(church$Y) - norm_vecs(church$X))
predict(VecFld, c(0, 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.