SparseVFC {SparseVFC}R Documentation

Sparse Vector Field Consensus

Description

The main function for the SparseVFC algorithm. See References for more information.

Usage

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
)

Arguments

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, k(x, y) = exp(-beta*||x-y||^2). Default value is 0.1.

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 1/a. Default Value is 10.

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 minP. Default value is 1e-5.

silent

Should the messages be suppressed? Default value is TRUE.

Value

A VFC object, which is a list containing the following elements:

X

A matrix of the positions of kernels.

Y

A matrix of the input vectors.

beta

The input value of beta.

V

A matrix of the estimated vectors.

C

A matrix of the coefficients of each kernel.

P

A vector of the posterior probability of the input vectors (Y) being an inlier.

VFCIndex

A vector of indices of the inliers.

sigma2

The \sigma^2 of the estimations weighted by P.

References

The algorithm is described in Ma et al. (2013) 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) doi:10.1109/CVPR.2011.5995336 for the earlier VFC algorithm.

Examples

data(church)
set.seed(1614)
VecFld <- SparseVFC(norm_vecs(church$X), norm_vecs(church$Y) - norm_vecs(church$X))
predict(VecFld, c(0, 0))

[Package SparseVFC version 0.1.2 Index]