#### Supplemental R-Code for #### #### (Psycho-)Analysis of Benchmark Experiments: A Formal Framework #### for Investigating the Relationship between Data Sets and #### Learning Algorithms #### #### by Manuel J. A. Eugster, Friedrich Leisch and Carolin Strobl. library(benchmark) library(classInt) ### Load uci13 benchmark data: load('uci13.RData') ### Categorize continuous variables: categorize <- function(x) { y <- cut(x, breaks = classIntervals(x)$brks) levels(y) <- c('NA', levels(y)) y[is.na(y)] <- 'NA' y } uci13.cat <- within(uci13, { input.n <- ordered(input.n) input.attr <- ordered(input.attr) input.factor.attr <- ordered(input.factor.attr) input.factor...bin <- ordered(input.factor...bin) input.numeric.attr <- ordered(input.numeric.attr) response.factor...cl <- ordered(response.factor...cl) input.factor...entropy <- categorize(input.factor...entropy) input.numeric.mac <- categorize(input.numeric.mac) input.numeric...skewness <- categorize(input.numeric...skewness) input.numeric...kurtosis <- categorize(input.numeric...kurtosis) response.factor...entropy <- categorize(response.factor...entropy) input2response.numeric2factor.fcc <- categorize(input2response.numeric2factor.fcc) input2response.numeric2factor.frac1 <- factor(input2response.numeric2factor.frac1) input2response.factor2factor.mi <- categorize(input2response.factor2factor.mi) input2response.factor2factor.enattr <- categorize(input2response.factor2factor.enattr) input2response.factor2factor.nsratio <- categorize(input2response.factor2factor.nsratio) }) ### Calculate tree: tree <- bttree(preference ~ ., data = uci13.cat, verbose = TRUE, minsplit = 200) load('uci13-tree.RData') # precalculated tree