prepareMOFA {MOFA} | R Documentation

## prepare a MOFAobject for training

### Description

Function to prepare a `MOFAmodel` object for training. Here, data, input/output option are specified and data, model and training options can be set.

### Usage

    prepareMOFA(object, DataOptions = NULL, ModelOptions = NULL,
      TrainOptions = NULL)

### Arguments

`object` | an untrained `MOFAmodel`
`DataOptions` | list of DataOptions (see `getDefaultDataOptions` details). If NULL, default data options are used.
`ModelOptions` | list of ModelOptions (see `getDefaultModelOptions` for details). If NULL, default model options are used.
`TrainOptions` | list of TrainOptions (see `getDefaultTrainOptions` for details). If NULL, default training options are used.

### Value

Returns an untrained `MOFAmodel` with specified data, model and training options. Next step is to train the model with `runMOFA`

### Examples

    # load data
    data("CLL_data", package = "MOFAdata")
    #create a MOFAmodel object
    MOFAobject <- createMOFAobject(CLL_data)
    # set options
    TrainOptions <- getDefaultTrainOptions()
    ModelOptions <- getDefaultModelOptions(MOFAobject)
    DataOptions <- getDefaultDataOptions()
    # prepare MOFAmodel object for training
    MOFAobject <- prepareMOFA(MOFAobject,
    DataOptions = DataOptions,
    ModelOptions = ModelOptions,
    TrainOptions = TrainOptions
    )
    MOFAobject

[Package MOFA version 1.2.0 Index]