Description Objects from the Class Slots Extends Methods Author(s) References See Also Examples
This class of objects contains the information describing a monte carlo experiment, i.e. its settings.
Objects can be created by calls of the form MonteCarlo(...)
providing the values for the class slots.
These objects contain information on the number of repetitions of the
experiments, the data used for training the models on each repetition,
the data used for testing these models, the random number
generator seed and optionally the
concrete data splits to use on each iteration of the Monte Carlo
experiment. Note that most of the times you will not supply these data
splits as the Monte Carlo routines in this infra-structure will take care of
building them. Still, this allows you to replicate some experiment
carried out with specific train/test splits.
nReps
:Object of class numeric
indicating
the number of repetitions of the Monte Carlo experiment (defaulting
to 10).
szTrain
:Object of class numeric
. If it is a
value between 0 and 1 it is interpreted as a percentage of the
available data set, otherwise it is interpreted as the number of
cases to use. It defaults to 0.25.
szTest
:Object of class numeric
If it is a
value between 0 and 1 it is interpreted as a percentage of the
available data set, otherwise it is interpreted as the number of
cases to use. It defaults to 0.25.
seed
:Object of class numeric
with the
random number generator seed (defaulting to 1234).
dataSplits
:Object of class list
containing the data splits to use on each Monte Carlo
repetition. Each element should be a list with two components:
test
and train
, on this order. Each of these is a
vector with the row ids to use as test and train sets of each
repetition of the Monte Carlo experiment.
Class EstCommon
, directly.
Class EstimationMethod
, directly.
signature(object = "MonteCarlo")
: method used to
show the contents of a MonteCarlo
object.
Luis Torgo ltorgo@dcc.fc.up.pt
Torgo, L. (2014) An Infra-Structure for Performance Estimation and Experimental Comparison of Predictive Models in R. arXiv:1412.0436 [cs.MS] http://arxiv.org/abs/1412.0436
LOOCV
,
CV
,
Bootstrap
,
Holdout
,
EstimationMethod
,
EstimationTask
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | showClass("MonteCarlo")
m1 <- MonteCarlo(nReps=10,szTrain=0.3,szTest=0.2)
m1
## Small example illustrating the format of user supplied data splits
## it assumes that the source data is formed by 10 cases and that each
## model is trainined with 3 cases and tested in the following case.
## This is obviously a unrealistic example in terms of size but
## illustrates the format of the data splits
m2 <- MonteCarlo(dataSplits=list(list(test=sample(1:150,50),train=sample(1:150,50)),
list(test=sample(1:150,50),train=sample(1:150,50)),
list(test=sample(1:150,50),train=sample(1:150,50))
))
m2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.