Use the learnerSelectoR
package to apply a set of
learners to a set of data representations and pick the approach which
generalizes best.
The data is represented by two vectors, x
and y
.
Each learner must be function with exactly four arguments named
metric
, transformation.x
, transformation.y
, and
metric.transformed
Its parameter metric
will be an instance of
RegressionQualityMetric
which guides the search on the actual,
raw data. However, since we internally use the
Transformation.applyDefault2D
method from the
dataTransformeR
package by default to generate different
representations of the raw data, each model fitting procedure may take place
in two steps, first on a transformed representation of the data
(metric.transformed
based on transformation.x
and
transformation.y
) and then the actual finalization fitting the actual
metric
. A learner returns an instance of FittedModel
which represents, well, the model it has fitted to its input data. Each
learner thus represents the process of adapting a specific model to some
data.
The metricGenerator
is a function which accepts two vectors x
and y
and returns an instance of
RegressionQualityMetric
. It will be used to generate the
quality metrics for guiding the model fitters. Since we internally use the
learning.learn
method from the learnerSelectoR
package,
the model may be chosen based on cross-validation and the metric generator is
then also used to generate quality metrics for the training and test datasets
used internally. If nothing else is specified, we use
RegressionQualityMetric.default
to generate the quality
metrics.
representations
is a list of TransformedData2D
instances
providing alernative views on the data, or NULL
if only the raw data
should be concerned. By default, we use
Transformation.applyDefault2D
to get a set of representations
if nothing else is specified.
The return value of this method will be an instance of
FittedModel
or NULL
if no learner could produce any
result.
1 2 3 | regressoR.applyLearners(x, y, learners,
representations = Transformation.applyDefault2D(x = x, y = y, addIdentity =
TRUE), metricGenerator = RegressionQualityMetric.default, q = 0.75)
|
x |
the vector of |
y |
the vector of |
learners |
the list of regression-based learner functions |
representations |
the list of data representations, or |
metricGenerator |
the metric generator function |
q |
the effort to be spent on learning: 0 is minimal (potentially fast/poor quality), 1 is maximal (potentially slow/high quality) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.