| gradient.search | R Documentation |
Gradient based optimization for user defined central orientation of a rotation sample.
gradient.search(
sample,
error,
minerr = 1e-05,
start = mean(sample),
theta = NULL
)
sample |
sample of rotations. |
error |
user defined function to observed distance between sample and estimate, has to have parameters for the sample and the estimate. |
minerr |
minimal distance to consider for convergence. |
start |
starting value for the estimation. |
theta |
size of the grid considered. |
list of
Shat estimate of the main direction
iter number of iterations necessary for convergence
theta final size of the grid
minerr error used for convergence
error numeric value of total sample's distance from main direction
# minimize L1 norm:
L1.error <- function(sample, Shat) {
sum(rot.dist(sample, Shat, method = "intrinsic", p = 1))
}
cayley.sample <- ruars(n = 10, rangle = rcayley, nu = 1, space = 'SO3')
SL1 <- gradient.search(cayley.sample, L1.error, start = id.SO3)
# visually no perceptible difference between median estimates from in-built function and
# gradient based search (for almost all starting values)
plot(cayley.sample, center=SL1$Shat, show_estimates="all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.