readJAMES: Read analysis results from JSON file

Description Usage Arguments Value See Also Examples

Description

Read results from a JSON file produced by the analysis tools in the 'JAMES' extensions module.

Usage

1

Arguments

file

string: path to a JSON file containing results produced by the analysis tools from the 'JAMES' extensions module.

Value

S3 object of class "james" containing the results of running a number of searches on a set of problems, where each search has been repeatedly applied for a number of runs. Data can be manipulated and extracted using the provided functions (see below).

See Also

Example data: james.

Data access and manipulations methods: reduceJAMES, mergeJAMES, getProblems, getSearches, getSearchRuns, getNumSearchRuns, getBestSolutionValues, getBestSolutions, getConvergenceTimes.

Plot functions: plotConvergence, boxplot.james.

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
28
# get path to raw JSON file included in package distribution
json.file <- system.file("extdata", "james.json", package = "james.analysis")

# read results from file
james <- readJAMES(json.file)
summary(james)

# plot convergence curves for coconut data set
plotConvergence(james, problem = "coconut", min.time = 1000, max.time = 100000)

# create box plots of solution values (quality) and convergence times
boxplot(james, problem = "coconut")
boxplot(james, problem = "coconut", type = "time")

# extract solution values and convergence times for parallel tempering and random descent
values.pt <- getBestSolutionValues(james, problem = "coconut", search = "Parallel Tempering")
times.pt <- getConvergenceTimes(james, problem = "coconut", search = "Parallel Tempering")
values.rd <- getBestSolutionValues(james, problem = "coconut", search = "Random Descent")
times.rd <- getConvergenceTimes(james, problem = "coconut", search = "Random Descent")

# perform wilcoxon test to compare distributions across algorithms
values.test <- wilcox.test(values.pt, values.rd)
values.test
times.test <- wilcox.test(times.pt, times.rd)
times.test

# adjust p-values for multiple testing
p.adjust(c(values.test$p.value, times.test$p.value))

hdbeukel/james-analysis-R documentation built on May 17, 2019, 3:18 p.m.