plot {dgpsi} | R Documentation |
This function draws validation plots of a GP, DGP, or linked (D)GP emulator.
## S3 method for class 'dgp'
plot(
x,
x_test = NULL,
y_test = NULL,
dim = NULL,
method = "mean_var",
style = 1,
min_max = TRUE,
color = "turbo",
type = "points",
verb = TRUE,
force = FALSE,
cores = 1,
threading = FALSE,
...
)
## S3 method for class 'lgp'
plot(
x,
x_test = NULL,
y_test = NULL,
dim = NULL,
method = "mean_var",
style = 1,
min_max = TRUE,
color = "turbo",
type = "points",
verb = TRUE,
force = FALSE,
cores = 1,
threading = FALSE,
...
)
## S3 method for class 'gp'
plot(
x,
x_test = NULL,
y_test = NULL,
dim = NULL,
method = "mean_var",
style = 1,
min_max = TRUE,
color = "turbo",
type = "points",
verb = TRUE,
force = FALSE,
cores = 1,
...
)
x |
can be one of the following emulator classes:
|
x_test |
same as that of |
y_test |
same as that of |
dim |
if
This argument is only used when |
method |
same as that of |
style |
either |
min_max |
a bool indicating if min-max normalization will be used to scale the testing output, RMSE, predictive mean and std from the
emulator. Defaults to |
color |
a character string indicating the color map to use when
Defaults to |
type |
either |
verb |
a bool indicating if the trace information on plotting will be printed during the function execution.
Defaults to |
force |
same as that of |
cores |
same as that of |
threading |
same as that of |
... |
N/A. |
See further examples and tutorials at https://mingdeyu.github.io/dgpsi-R/.
A patchwork
object.
plot()
calls validate()
internally to obtain validation results for plotting. However, plot()
will not export the
emulator object with validation results. Instead, it only returns the plotting object. For small-scale validations (i.e., small
training or testing data points), direct execution of plot()
is fine. However, for moderate- to large-scale validations,
it is recommended to first run validate()
to obtain and store validation results in the emulator object, and then supply the
object to plot()
. This is because if an emulator object has the validation results stored, each time when plot()
is invoked, unnecessary evaluations of repetitive LOO or OOS validation will not be implemented.
plot()
uses information provided in x_test
and y_test
to produce the OOS validation plots. Therefore, if validation results
are already stored in x
, unless x_test
and y_test
are identical to those used by validate()
, plot()
will re-evaluate OOS
validations before plotting.
Any R vector detected in x_test
and y_test
will be treated as a column vector and automatically converted into a single-column
R matrix. Thus, if x_test
or y_test
is a single testing data point with multiple dimensions, it must be given as a matrix.
The returned patchwork
object contains the ggplot2
objects. One can modify the included individual ggplots
by accessing them with double-bracket indexing. See https://patchwork.data-imaginist.com/ for further information.
## Not run:
# See gp(), dgp(), or lgp() for an example.
## End(Not run)