Description Usage Arguments Details Author(s) See Also Examples
Produces a plot illustrating the result of a cLHS sampling procedure.
1 2 |
x |
Object of class “cLHS_result”. |
modes |
A character vector describing the plot to produce (see Details) |
... |
Other ggplot2 plotting parameters. |
The subplots to be included in the final illustration are controlled by the
mode
option: - "obj"
adds the evolution of the objective
function over the iterations - "cost"
adds the evolution of the cost
function over the iterations (if available in x
) - "hist"
adds
the comparison of the distributions of each variables in both the original
object and the sampled result using histogram plots (for continuous
variables). - "dens"
adds the comparison of the distributions of each
variables in both the original object and the sampled result using density
plots (for continuous variables). - "box"
adds the comparison of the
distributions of each variables in both the original object and the sampled
result using boxplots (for continuous variables).
Pierre Roudier
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | df <- data.frame(
a = runif(1000),
b = rnorm(1000),
c = sample(LETTERS[1:5], size = 1000, replace = TRUE)
)
res <- clhs(df, size = 50, iter = 1000, use.cpp = FALSE, progress = FALSE, simple = FALSE)
# You can plot only the objective function
plot(res, mode = "obj")
# Or you can compare the distribution in the original object
# and in the sampled result
plot(res, mode = c("obj", "box"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.