R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("mlbench-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('mlbench') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "as.data.frame.mlbench" > > ### * as.data.frame.mlbench > > flush(stderr()); flush(stdout()) > > ### Name: as.data.frame.mlbench > ### Title: Convert an mlbench object to a dataframe > ### Aliases: as.data.frame.mlbench > ### Keywords: manip > > ### ** Examples > > p <- mlbench.xor(5) > p $x [,1] [,2] [1,] -0.4689827 0.7967794 [2,] -0.2557522 0.8893505 [3,] 0.1457067 0.3215956 [4,] 0.8164156 0.2582281 [5,] -0.5966361 -0.8764275 $classes [1] 1 1 2 2 2 Levels: 1 2 attr(,"class") [1] "mlbench.xor" "mlbench" > as.data.frame(p) x.1 x.2 classes 1 -0.4689827 0.7967794 1 2 -0.2557522 0.8893505 1 3 0.1457067 0.3215956 2 4 0.8164156 0.2582281 2 5 -0.5966361 -0.8764275 2 > > > cleanEx(); ..nameEx <- "bayesclass" > > ### * bayesclass > > flush(stderr()); flush(stdout()) > > ### Name: bayesclass > ### Title: Bayes classifier > ### Aliases: bayesclass bayesclass.noerr bayesclass.mlbench.2dnormals > ### bayesclass.mlbench.circle bayesclass.mlbench.xor > ### bayesclass.mlbench.cassini bayesclass.mlbench.cuboids > ### bayesclass.mlbench.twonorm bayesclass.mlbench.threenorm > ### bayesclass.mlbench.ringnorm > ### Keywords: classif > > ### ** Examples > > # 6 overlapping classes > p <- mlbench.2dnormals(500,6) > plot(p) > > plot(p$x, col=as.numeric(bayesclass(p))) > > > > cleanEx(); ..nameEx <- "mlbench.2dnormals" > > ### * mlbench.2dnormals > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.2dnormals > ### Title: 2-dimensional Gaussian Problem > ### Aliases: mlbench.2dnormals > ### Keywords: datagen > > ### ** Examples > > # 2 classes > p <- mlbench.2dnormals(500,2) > plot(p) > # 6 classes > p <- mlbench.2dnormals(500,6) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.cassini" > > ### * mlbench.cassini > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.cassini > ### Title: Cassini: A 2 Dimensional Problem > ### Aliases: mlbench.cassini > ### Keywords: datagen > > ### ** Examples > > p <- mlbench.cassini(5000) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.circle" > > ### * mlbench.circle > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.circle > ### Title: Circle in a Square Problem > ### Aliases: mlbench.circle > ### Keywords: datagen > > ### ** Examples > > # 2d example > p<-mlbench.circle(300,2) > plot(p) > # > # 3d example > p<-mlbench.circle(300,3) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.cuboids" > > ### * mlbench.cuboids > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.cuboids > ### Title: Cuboids: A 3 Dimensional Problem > ### Aliases: mlbench.cuboids > ### Keywords: datagen > > ### ** Examples > > p <- mlbench.cuboids(7000) > plot(p) > ## Not run: > ##D library(Rggobi) > ##D g <- ggobi(p$x) > ##D g$setColors(p$class) > ##D g$setMode("2D Tour") > ## End(Not run) > > > cleanEx(); ..nameEx <- "mlbench.ringnorm" > > ### * mlbench.ringnorm > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.ringnorm > ### Title: Ringnorm Benchmark Problem > ### Aliases: mlbench.ringnorm > ### Keywords: datagen > > ### ** Examples > > p<-mlbench.ringnorm(1000, d=2) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.smiley" > > ### * mlbench.smiley > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.smiley > ### Title: The Smiley > ### Aliases: mlbench.smiley > ### Keywords: datagen > > ### ** Examples > > p<-mlbench.smiley() > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.spirals" > > ### * mlbench.spirals > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.spirals > ### Title: Two Spirals Benchmark Problem > ### Aliases: mlbench.spirals mlbench.1spiral > ### Keywords: datagen > > ### ** Examples > > # 1 cycle each, no noise > p<-mlbench.spirals(300) > plot(p) > # > # 1.5 cycles each, with noise > p<-mlbench.spirals(300,1.5,0.05) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.threenorm" > > ### * mlbench.threenorm > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.threenorm > ### Title: Threenorm Benchmark Problem > ### Aliases: mlbench.threenorm > ### Keywords: datagen > > ### ** Examples > > p<-mlbench.threenorm(1000, d=2) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.twonorm" > > ### * mlbench.twonorm > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.twonorm > ### Title: Twonorm Benchmark Problem > ### Aliases: mlbench.twonorm > ### Keywords: datagen > > ### ** Examples > > p<-mlbench.twonorm(1000, d=2) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.waveform" > > ### * mlbench.waveform > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.waveform > ### Title: Waveform Database Generator (written in C) > ### Aliases: mlbench.waveform > ### Keywords: datagen > > ### ** Examples > > p<-mlbench.waveform(100) > plot(p) > > > > cleanEx(); ..nameEx <- "mlbench.xor" > > ### * mlbench.xor > > flush(stderr()); flush(stdout()) > > ### Name: mlbench.xor > ### Title: Continuous XOR Benchmark Problem > ### Aliases: mlbench.xor > ### Keywords: datagen > > ### ** Examples > > # 2d example > p<-mlbench.xor(300,2) > plot(p) > # > # 3d example > p<-mlbench.xor(300,3) > plot(p) > > > > cleanEx(); ..nameEx <- "plot.mlbench" > > ### * plot.mlbench > > flush(stderr()); flush(stdout()) > > ### Name: plot.mlbench > ### Title: Plot mlbench objects > ### Aliases: plot.mlbench > ### Keywords: hplot > > ### ** Examples > > # 6 normal classes > p <- mlbench.2dnormals(500,6) > plot(p) > # 4-dimensiona XOR > p <- mlbench.xor(500,4) > plot(p) > > > > ### *