distsumlpmin function

distsumlpmin at orloca package

distsumlpmin at orloca package

distsumlpmin is the distsummin function for the norm (lpl_p). This function returns the solution of the minimization problem. Mainly for internal use.

distsumlpmin( o, x = 0, y = 0, p = 2, max.iter = 100, eps = 0.001, verbose = FALSE, algorithm = "Weiszfeld", ... )

Arguments

  • o: An object of loca.p class.
  • x: The x coordinate of the starting point. It's default value is 0.
  • y: The y coordinate of the starting point. It's default value is 0.
  • max.iter: Maximum number of iterations allowed. It's default value is 100000.
  • eps: The module of the gradient in the stop rule. It's default value is 1e-3.
  • verbose: If TRUE the function produces detailed output. It's default value is FALSE.
  • algorithm: The method to be use. For this version of the package, the valid values are: "gradient" for a gradient based method, "search" for local search method (this option is deprecated), "ucminf" for optimization with ucminf from ucminf package, and "Weiszfeld" for the Weiszfeld method or any of the valid method for optim function, now "Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN". "Weiszfeld" is the default value.

Returns

distsummin returns an array with the coordinates of the solution point.

Details

The algorithms Weiszfeld and gradient include and optimality test for demand points. The Weiszfeld version of the algorithm also implements slow convergence test and accelerator procedure.

If p<1p < 1 thus lpl_p is not a norm, so, only p1p \ge 1 are valid values.

Since l2l_2 norm is the Euclidean norm, when p=2p=2 distsumlpmin are equal to distsummin. But the computations involved are greater for the first form.

max.iter for SANN algorithm is the number of evaluation of objective function, so this method usually requires large values of max.iter to reach optimal value

The function zsummin is deprecated and will be removed from new versions of the package.

Examples

# A new unweighted loca.p object loca <- loca.p(x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1)) # Compute the minimum sol<-distsummin(loca) # Show the result sol # Evaluation of the objective function at solution point distsum(loca, sol[1], sol[2])

See Also

See also orloca-package, loca.p and distsum.