plotExpSummary: Barplot for summarizing an experiment output variable

Description Usage Arguments Details Value Examples

View source: R/fun_plotExpSummary.R

Description

This function builds a barplot for a given experiment output variable, summarizing its distribution according to the different methods and problems. The aspect of the plot can be parametrized in several ways.

Usage

1
2
plotExpSummary(exp, output, columns = 0, freeScale = FALSE,
  fun = identity, grayscale = FALSE)

Arguments

exp

- The experiment object to take the data from

output

- A string identifying the name of the output variable to be plotted

columns

- Integer number, 0 for a wide aspect plot and any other value to include n columns of facets separating the problems.

freeScale

- Boolean, if using facets sets the scale of each one independent or not

fun

- A function to be applied to the selected output variables before being plotted.

grayscale

- Defaulted to False. True for a plot in grayscale.

Details

Please notice that the plot function requires that an unique configuration of parameters is present in the experiment. So the user must have processed and instantiated the experiment before.

Value

an exPlot object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This example plots the distribution of the trainingTime variable in the 
# wekaExperiment problem.

# First we create the experiment from the problem.
experiment <- expCreate(wekaExperiment, name="test", parameter="fold")

# Next we must process it to have an unique parameter configuration:
# We select a value for the parameter featureSelection:
experiment <- expSubset(experiment, list(featureSelection = "yes"))
# Then we reduce the fold parameter:
experiment <- expReduce(experiment, "fold", mean)
# Finally we remove unary parameters by instantiation:
experiment <- expInstantiate(experiment, removeUnary=TRUE)

# Now we can generate several plots:

# Default plot:
plotExpSummary(experiment, "accuracy")

# We can include faceting in the plot by dividing it into columns:
plotExpSummary(experiment, "accuracy", columns=3)

# If we want to show the independent interaction for the output variable
# in each experiment we can make the scales for example, remark the difference
# in :
plotExpSummary(experiment, "trainingTime", columns=3, freeScale=FALSE)
plotExpSummary(experiment, "trainingTime", columns=3, freeScale=TRUE)

jacintoArias/exreport documentation built on June 6, 2021, 3:40 a.m.