Description Usage Arguments Details Value Note Author(s) See Also Examples
For the first configuration name .conf in tdm$runList call the first tuning algorithm
in tdm$tuneMethod (via function tdmDispatchTuner).
After tuning perform with the best parameters a run of tdm$unbiasedFunc
(usually unbiasedRun).
This experiment is repeated tdm$nExperim times.
1 | tdmTuneIt(envT, dataObj)
|
envT |
an environment containing on input at least the element
|
dataObj |
object of class |
tdmTuneIt differs from tdmBigLoop in that it processes only one configuration
.conf and that it has dataObj as a mandatory calling parameter. This simplifies
the data flow and is thus less error-prone.
tdm refers to envT$tdm.
See Details in tdmBigLoop for the list of avaialble tuners.
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 current directoy.
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 (with tdm$U.saveModel==FALSE smaller .RData files).
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
tdmBigLoop, tdmDispatchTuner, unbiasedRun
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 | #*# 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 file sonar_04.roi. 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"
, 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();
#
# perform a complete tuning + unbiased eval
#
envT <- tdmEnvTMakeNew(tdm,sCList=list(ctrlSC)); # construct envT from settings in tdm and ctrlSC
dataObj <- tdmReadTaskData(envT,envT$tdm);
envT <- tdmTuneIt(envT,dataObj=dataObj); # start the tuning loop
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.