plotIterationResults = function(iterationResultsAggr) {
plot = ggplot2::ggplot(iterationResultsAggr, ggplot2::aes(x = fw.abs, y = acc, colour = method)) +
ggplot2::geom_line() +
ggplot2::theme_linedraw() +
ggplot2::xlab("Number of Features") +
ggplot2::ylab("Accuracy") +
ggplot2::theme(
legend.position = "none",
text = ggplot2::element_text(size = 16)
)
# create a plot with two rows when only one data set is selected
# otherwise create grid
if(length(unique(iterationResultsAggr$dataset)) > 1) {
plot = plot + ggplot2::facet_grid(dataset~classifier, scales = "free_x",)
}
else {
plot = plot + ggplot2::facet_wrap(~ classifier, ncol = 2)
}
return((plot))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.