inner_train_model_expr {BPRMeth} | R Documentation

## (INNER) Train expression model from methylation profiles

### Description

This function trains a regression model for predicting gene expression levels by taking as input the higher order methylation features extracted from specific genomic regions.

### Usage

    inner_train_model_expr(formula = NULL, model_name = "lm", train,
      is_summary = TRUE)

### Arguments

`formula` | An object of class `formula`, e.g. see `lm` function. If NULL, the simple linear model is used.
`model_name` | A string denoting the regression model. Currently, available models are: `"svm"`, `"randomForest"`, `"rlm"`, `"mars"`, `"gp"`, and `"lm"`.
`train` | The training data.
`is_summary` | Logical, print the summary statistics.

### Value

A list containing the following elements:

- `formula`: The formula that was used.

- `gex_model`: The fitted model.

- `train_pred` The predicted values for the training data.

- `train_errors`: The training error metrics.

### Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

### See Also

`predict_expr`

### Examples

    # Create synthetic data
    train_data <- data.frame(x = rnorm(20), y=rnorm(20, 1, 4))
    res <- inner_train_model_expr(formula = y~., train = train_data)

    # Using a different model
    res <- inner_train_model_expr(model_name = "randomForest",
                                  train = train_data)

[Package BPRMeth version 1.6.0 Index]