optim_proj | R Documentation |
Given the objective function of an optimization problem and a potential solution, calculates "projection plots" along each coordinate of the solution vector, with all other coordinates being fixed at the input values.
optim_proj(
xsol,
fun,
maximize = TRUE,
xrng = 0.1,
npts = 100,
plot = TRUE,
...
)
xsol |
Potential solution vector of length |
fun |
Objective function to be maximized (or minimized), with first argument the length- |
maximize |
Logical, whether a maximum or a minimum of the objective function is sought. |
xrng |
Optional specification of the range of each projection plot. Can be: (i) a |
npts |
Number of points in each projection plot. |
plot |
Logical, whether or not to display the projection plots or just return their contents. |
... |
Further arguments to pass to the |
An object of class optproj
inheriting from optcheck
(returned invisibly if plot = TRUE
, with elements:
xsol
The potential solution.
ysol
The value of fun(xsol)
.
maximize
Logical indicating whether the potential solution should maximize or minimize the objective function.
xproj
An npts x nx
matrix where each column is the x
-axis of the projection plot along the given component of theta
.
yproj
An npts x nx
matrix where each column is the y
-axis of the corresponding projection plot.
plot
, summary
, print
, and diff
methods for projection plots are available; see plot.optproj()
, summary.optproj()
, print.optproj()
, and diff.optproj()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.