Description Usage Arguments Details Value Note Author(s) See Also Examples
For each configuration object .conf
in tdm$runList
call all tuning algorithms (SPOT, CMA-ES
or other) specified in tdm$tuneMethod
(via function tdmDispatchTuner
).
After each tuning process perform a run of tdm$unbiasedFunc
(usually unbiasedRun
).
Each of these experiments is repeated tdm$nExperim
times. Thus we have for each tripel
(confName,nExp,theTuner) |
|
a tuning result. The ranges of the triple elements are:
confName in tdm$runList |
|
nExp in 1,...,tdm$nExperim |
|
theTuner in tdm$tuneMethod |
|
1 | tdmBigLoop(envT, dataObj = NULL)
|
envT |
an environment containing on input at least the element
|
dataObj |
|
tdm
refers to envT$tdm
.
The available tuning algorithms (tuners) are
spotTuner
: Call spot
.
lhdTuner
: Perform a parameter tuning using a Latin hypercube design (LHD)
for obtaining best design points. LHD is performed by configuring SPOT
in such a way that all the budget is used for the initial design (usually LHD).
cma_jTuner
: Perform a parameter tuning by CMA-ES, using the *Java*
implementation by Niko Hansen through the interface package rCMA-package
.
cmaesTuner
: Perform a parameter tuning by CMA-ES, using the *R*-implementation
(package cma_es
by Olaf Mersmann)
(deprecated, use cma_jTuner
instead).
bfgsTuner
: Perform a parameter tuning by Broyden, Fletcher, Goldfarb and Shanno (BFGS) method.
The L-BFGS-B version allowing box constraints is used.
environment envT
, containing the results
res |
data frame with results from last tuning (one line for each call of |
bst |
data frame with the best-so-far results from last tuning (one line collected after each (SPO) step) |
resGrid |
list with data frames |
bstGrid |
list with data frames |
theFinals |
data frame with one line for each triple |
result |
object of class |
tunerVal |
an object with the return value from the last tuning process. For every tuner, this is the list
|
Environment envT
contains further elements, but they are only relevant for the internal operation of
tdmBigLoop
and its subfunctions.
Side effects:
A compressed version of envT
is saved to file tdm$filenameEnvT
(default: <runList[1]>.RData
) in directory tdm$path
. If tdm$path==NULL
use the current directory.
If tdm$U.saveModel==TRUE
, then envT$result$lastRes$lastModel
(the last
trained model) will be saved to tdm$filenameEnvT
.
The default is tdm$U.saveModel==TRUE
. If tdm$U.saveModel==FALSE
then smaller .RData
files will result.
Example usages of function tdmBigLoop
are shown in
demo(demo03sonar) |
|
demo(demo03sonar_B) |
|
demo(demo04cpu) |
|
where the corresponding R-sources are in directory demo
.
Wolfgang Konen (wolfgang.konen@th-koeln.de), THK, Patrick Koch
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 29 30 31 32 33 34 35 36 37 38 39 40 | #*# This demo shows a complete tuned data mining process (level 3 of TDMR) where
#*# the data mining task is the classification task SONAR (from UCI repository,
#*# http://archive.ics.uci.edu/ml/datasets/Connectionist+Bench+%28Sonar,+Mines+vs.+Rocks%29).
#*# The data mining process is in main_sonar.r, which calls tdmClassifyLoop and tdmClassify
#*# with Random Forest as the prediction model.
#*# The three parameter to be tuned are CUTOFF1, CLASSWT2 and XPERC, as specified
#*# in controlSC() (control_sonar.r). The tuner used here is LHD.
#*# Tuning runs are rather short, to make the example run quickly.
#*# Do not expect good numeric results.
#*# See demo/demo03sonar_B.r for a somewhat longer tuning run, with two tuners SPOT and LHD.
## path is the dir with data and main_*.r file:
path <- paste(find.package("TDMR"), "demo02sonar",sep="/");
#path <- paste("../../inst", "demo02sonar",sep="/");
## control settings for TDMR
tdm <- list( mainFunc="main_sonar"
, runList = c("sonar_04.conf")
, umode="CV" # { "CV" | "RSUB" | "TST" | "SP_T" }
, tuneMethod = c("lhd")
, filenameEnvT="exBigLoop.RData" # file to save environment envT
, nrun=1, nfold=2 # repeats and CV-folds for the unbiased runs
, nExperim=1
, optsVerbosity = 0 # the verbosity for the unbiased runs
);
source(paste(path,"main_sonar.r",sep="/")); # main_sonar, readTrnSonar
#*# This demo is for example and help (more meaningful, a bit higher budget)
source(paste(path,"control_sonar.r",sep="/")); # controlDM, controlSC
ctrlSC <- controlSC();
ctrlSC$opts <- controlDM();
# construct envT from settings given in tdm & sCList
envT <- tdmEnvTMakeNew(tdm,sCList=list(ctrlSC));
dataObj <- tdmReadTaskData(envT,envT$tdm);
envT <- tdmBigLoop(envT,dataObj=dataObj); # start the big tuning loop
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.