Constructs models following a recipe.

Share:

Description

Constructs models following a recipe.

Usage

1
2
train(expression, attribute, weather, recipe, weight = NULL,
  min.expressed.rate = 0.01)

Arguments

expression

An object that represents gene expression data. The object can be created from a dumped/saved dataframe of size nsamples * ngenes using FIT::load.expression(). (At the moment it is an instance of a hidden class IO$Expression, but this may be subject to change.)

attribute

An object that represents the attributes of microarray/RNA-seq data. The object can be created from a dumped/saved dataframe of size nsamples * nattributes using FIT::load.attribute(). (At the moment it is an instance of a hidden class IO$Attribute, but this may be subject to change.)

weather

An object that represents actual or hypothetical weather data with which the training of models are done. The object can be created from a dumped/saved dataframe of size ntimepoints * nfactors using FIT::load.weather(). (At the moment it is an instance of a hidden class IO$Weather, but this may be subject to change.)

recipe

An object that represents the training protocol of models. A recipe can be created using FIT::make.recipe().

weight

An optional numerical matrix of size nsamples * ngenes that during regression penalizes errors from each sample using the formula sum_{s in samples} (weight_s) (error_s)^2.

This argument is optional for a historical reason, and when it is omitted, all samples are equally penalized.

min.expressed.rate

A number used to A gene with var(expr) < thres.expr is regarded as unexpressed, and FIT sets its model as: expr = log(offset) + 0*inputs.

Value

A collection of trained models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# create recipe
recipe <- FIT::make.recipe(..)

#load training data
training.attribute  <- FIT::load.attribute('attribute.2008.txt');
training.weather    <- FIT::load.weather('weather.2008.dat', 'weather')
training.expression <- FIT::load.expression('expression.2008.dat', 'ex', genes)
training.weight     <- FIT::load.weight('weight.2008.dat', 'weight', genes)

# train models
models <- FIT::train(training.expression,
                     training.attribute,
                     training.weather,
                     recipe,
                     training.weight)

## End(Not run)