...
 
Commits (2)
Package: optimParallel
Type: Package
Title: Parallel Versions of the Gradient-Based optim() Methods
Version: 0.7-2.2
Date: 2018-07-23
Version: 0.7-3
Date: 2018-07-27
Author: Florian Gerber
Maintainer: Florian Gerber <florian.gerber@math.uzh.ch>
Description: Provides parallel versions of the gradient-based optim() methods. The main function of the package is optimParallel(), which has the same usage and output as optim(). Using optimParallel() can significantly reduce the optimization time.
......
- version 0.7-2.2:
- version 0.7-3:
commit 01ebb9016000a7b087c01b190db0b7ab9d4778d6
Author: Florian Gerber <florian.gerber@math.uzh.ch>
Date: Fri Jul 27 22:40:37 2018 -0600
(1) indexing 'par' by names inside 'fn' works now.
e.g. optimParallel(par=c(a=1), fn <- function(x) {x["a"]^2})
(2) using functions and method from loaded packages works now.
......
......@@ -13,7 +13,7 @@
#' @param fn see the documentation of \code{\link[stats]{optim}}.
#' @param gr see the documentation of \code{\link[stats]{optim}}.
#' @param ... see the documentation of \code{\link[stats]{optim}}.
#' Note that depending on the chosen cluster type, the \code{.GlobalEnv} of the R processes in the cluster contain different R objects compared to the main R process.
#' Note that depending on the chosen cluster type for parallel execution, the \code{.GlobalEnv} of the R processes in the cluster contain different R objects compared to the main R process.
#' In that case, it may be necessary to add all R object required by \code{fn} and \code{gr} here in order to pass them to the R processes in the cluster.
#' @param method parallel versions of the gradient-based methods \code{"L-BFGS-B"} (default), \code{"BFGS"}, and \code{"CG"} of \code{\link[stats]{optim}} are available.
#' See the documentation of \code{\link[stats]{optim}} for information on those methods.
......@@ -33,7 +33,7 @@
#' If \code{TRUE}, a numeric forward difference approximation of the gradient essentially defined as
#' \eqn{(fn(x+\epsilon)-fn(x))/\epsilon} is used. This reduces the number of function calls from \eqn{1+2p} to \eqn{1+p} and can be useful if the number of available cores is smaller than \eqn{1+2p} and if the memory limit is reached.}
#' \item{\code{loginfo}}{ logical vector of length 1 with default value \code{FALSE} when loading the package. If \code{TRUE},
#' additional log information containing the evaluated parameters as well as return the values of \code{fn} and \code{gr} is returned.}
#' additional log information containing the evaluated parameters as well as return values of \code{fn} and \code{gr} is returned.}
#' }
#'
#' @return Same as the return value of \code{\link[stats]{optim}}. See the documentation thereof for more information.\cr
......
......@@ -25,7 +25,7 @@ optimParallel(par, fn, gr = NULL, ..., method = c("L-BFGS-B", "BFGS", "CG"),
\item{gr}{see the documentation of \code{\link[stats]{optim}}.}
\item{...}{see the documentation of \code{\link[stats]{optim}}.
Note that depending on the chosen cluster type, the \code{.GlobalEnv} of the R processes in the cluster contain different R objects compared to the main R process.
Note that depending on the chosen cluster type for parallel execution, the \code{.GlobalEnv} of the R processes in the cluster contain different R objects compared to the main R process.
In that case, it may be necessary to add all R object required by \code{fn} and \code{gr} here in order to pass them to the R processes in the cluster.}
\item{method}{parallel versions of the gradient-based methods \code{"L-BFGS-B"} (default), \code{"BFGS"}, and \code{"CG"} of \code{\link[stats]{optim}} are available.
......@@ -51,7 +51,7 @@ See \code{\link[parallel]{setDefaultCluster}} for information on how to set up a
If \code{TRUE}, a numeric forward difference approximation of the gradient essentially defined as
\eqn{(fn(x+\epsilon)-fn(x))/\epsilon} is used. This reduces the number of function calls from \eqn{1+2p} to \eqn{1+p} and can be useful if the number of available cores is smaller than \eqn{1+2p} and if the memory limit is reached.}
\item{\code{loginfo}}{ logical vector of length 1 with default value \code{FALSE} when loading the package. If \code{TRUE},
additional log information containing the evaluated parameters as well as return the values of \code{fn} and \code{gr} is returned.}
additional log information containing the evaluated parameters as well as return values of \code{fn} and \code{gr} is returned.}
}}
}
\value{
......