Learn R Programming

FIT (version 0.0.6)

optim: A raw API for optimizing model parameters.

Description

Note: use train() unless the user is willing to accept breaking API changes in the future.

Usage

optim(expression, weight, attribute, weather, recipe, models, maxit = NULL,
  nfolds = NULL)

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$Attribute, but this may be subject to change.)

weight

A 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.

Note that, unlike for FIT::train(), this argument is NOT optional.

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().

models

A collection of models being trained as is returnd by FIT::init().

At this moment, it must be a list (genes) of a list (envs) of models and must contain at least one model. (THIS MIGHT CHANGE IN A FUTURE.)

maxit

An optional number that specifies the maximal number of times that the parameter optimization is performed.

The user can control this parameter by using the opts argument for FIT::train().

nfolds

An optional number that specifies the order of cross validation when optim method is 'lasso'. This is simply ignored when optim method is 'lm'.

Value

A collection of models whose parameters are optimized by using the 'optim' pipeline in the argument recipe.