Description Usage Arguments See Also
Recursively, a source
directory is traversed and all
files matching to a selector
regular expression are picked up,
loaded with a loader
, and then modelled by the regressor. The
resulting models are stored in a destination
folder in a structure
mirroring the source folder.
This method uses regressoR.learnForExport
to learn the models
and stores them into files using saveRDS
to store them. They
can later be read using regressoR.loadResult
.
1 2 3 4 5 6 7 8 9 10 11 | regressoR.batchLearn(source = getwd(), destination = file.path(source,
"../models"), loader = function(file) read.csv(file, sep = "\t", header =
FALSE)[c(1, 2)], selector = path.extensionRegExp("txt"),
check.directory = NULL, learn.single = TRUE, learn.all = FALSE,
learners = regressoR.defaultLearners(), representations = function(x, y)
Transformation.applyDefault2D(x = x, y = y, addIdentity = TRUE),
metricGenerator = RegressionQualityMetric.default,
suffix.single = "_single.model", suffix.all = "_all.model", q = 0.75,
includeMetric = TRUE, cores = 1L, logging = if (cores <= 1L) { TRUE
} else { file.path(destination, "log.txt") }, returnResults = FALSE,
skipExisting = (!returnResults))
|
source |
the source directory, which is recursively searched for files with data to be modeled |
destination |
the destination folder, will be created if not existing |
loader |
a loader function which accepts a vector of paths and is
supposed to return an |
selector |
a regular expression against which file names are matched. Only matching files are considered. |
check.directory |
a function receiving a |
learn.single |
should every single file matching to the |
learn.all |
should all the files in one directory combined and modeled at once? |
learners |
the model learners to be applied |
representations |
a function which can transform a |
metricGenerator |
the learning quality metric generator |
suffix.single |
the suffix to append to the files containing the single models |
suffix.all |
the suffix to be applied to the files containing the models of all files in a folder |
q |
the modelling quality parameter |
includeMetric |
should the metric used for learning be stored in the files |
cores |
the number of cores to use ( |
logging |
should progress information be printed: either |
returnResults |
should we return the computed results or not? |
skipExisting |
should already existing models (resulting from a previous, incomplete execution) simply be skipped or overwritting |
regressoR.learnForExport
regressoR.loadResult
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.