createWorkbench {GROAN} | R Documentation |
Workbench constructor
Description
This function creates a GROAN.Workbench instance (or fails trying). The created object contains:
a) one regressor with its own specific configuration
b) the experiment parameters (number of repetitions, number of folds in case of crossvalidation, stratification...)
You can have a general description of the created object using the overridden print.GROAN.Workbench
function.
It is possible to add other regressors to the created GROAN.Workbench
object using addRegressor.
Once the GROAN.Workbench
is created it must be passed to GROAN.run to start the experiment.
Usage
createWorkbench(
folds = 10,
reps = 5,
stratified = FALSE,
outfolder = NULL,
outfile.name = "accuracy.csv",
saveHyperParms = FALSE,
saveExtraData = FALSE,
regressor = phenoRegressor.rrBLUP,
regressor.name = "default regressor",
...
)
Arguments
folds |
number of folds for crossvalidation, defaults to 10. If |
reps |
number of times the whole test must be repeated, defaults to 5 |
stratified |
boolean indicating whether GROAN should take into account data strata. This have two
effects. First, the crossvalidation becomes stratified, meaning that folds will be
split so that training and test sets will contain the same proportions of each data stratum.
Second, prediction accuracy will be assessed (also) by strata.
If no strata are present in the GROAN.NoisyDataSet
object and |
outfolder |
folder where to save the data. If |
outfile.name |
file name to be used to save the accuracies in a text file. Defaults to "accuracy.csv".
Ignored if |
saveHyperParms |
boolean indicating if the hyperparameters from regressor training should be
saved in |
saveExtraData |
boolean indicating if extradata from regressor training should be
saved in |
regressor |
regressor function. Defaults to |
regressor.name |
string that will be used in reports. Keep that in mind when deciding names. Defaults to "default regressor" |
... |
extra parameter are passed to regressor function |
Value
An instance of GROAN.Workbench
See Also
addRegressor GROAN.run createNoisyDataset
Examples
#creating a Workbench with all default arguments
wb1 = createWorkbench()
#another Workbench, with different crossvalidation
wb2 = createWorkbench(folds=5, reps=20)
#a third one, with a different regressor and extra parameters passed to regressor function
wb3 = createWorkbench(regressor=phenoRegressor.BGLR, regressor.name='Bayesian Lasso', type='BL')