# Rattle: Data Mining by Example # # Copyright (c) 2011 Graham.Williams@togaware.com # # Build a conditional tree source("datasets.R") MODEL <- new.env(parent=weatherDS) evalq({ require(party) build.time <- system.time(model <- ctree(formula=form, data=data[train, vars])) pr <- sapply(treeresponse(model, data[test, vars]), function(x) x[2]) cl <- predict(model, data[test, vars]) }, MODEL) MODEL$model MODEL$build.time save(MODEL, file="ctree01.Rdata") print(MODEL$model) plot(MODEL$model)