predict: Predicts gene expressions using pretrained models.

Description Usage Arguments Value Examples

View source: R/FIT.R

Description

Predicts gene expressions using pretrained models.

Usage

1
predict(models, attribute, weather)

Arguments

models

A list of trained models for the genes of interest.

At the moment the collection of trained models returned by FIT::train() cannot be directly passed to FIT::predict(): the user has to explicitly convert it to an appropriate format by using FIT::train.to.predict.adaptor(). (This restriction might be removed in a future.)

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 predictions of gene expressions are made. 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.)

Value

A list of prediction results as returned by the models.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# prepare models
# NOTE: FIT::train() returns a nested list of models
#   so we have to flatten it using FIT::train.to.predict.adaptor()
#   before passing it to FIT::predict().
models <- FIT::train(..)
models.flattened <- FIT::train.to.predict.adaptor(models)

# load data used for prediction
prediction.attribute  <- FIT::load.attribute('attribute.2009.txt')
prediction.weather    <- FIT::load.weather('weather.2009.dat', 'weather')
prediction.expression <- FIT::load.expression('expression.2009.dat', 'ex', genes)

prediction.results <- FIT::predict(models.flattened,
                                   prediction.attribute,
                                   prediction.weather)

## End(Not run)

FIT documentation built on May 2, 2019, 3:38 p.m.

Related to predict in FIT...