make_feature_from_expression {PrInCE} | R Documentation

## Create a feature vector from expression data

### Description

Convert a gene or protein expression matrix into a feature vector that matches the dimensions of a data frame used as input to a classifier, such as a naive Bayes, random forests, or support vector machine classifier, by calculating the correlation between each pair of genes or proteins.

### Usage

    make_feature_from_expression(expr, dat, node_columns = c(1, 2), ...)

### Arguments

`expr` | a matrix containing gene or protein expression data, with genes/proteins in columns and samples in rows
`dat` | the data frame of features to be used by the classifier, with protein pairs in the columns specified by the `node_columns` argument
`node_columns` | a vector of length two, denoting either the indices (integer vector) or column names (character vector) of the columns within the data frame containing the nodes participating in pairwise interactions; defaults to the first two columns of the data frame (`c(1, 2)`)
`...` | arguments passed to `cor`

### Value

a vector matching the dimensions and order of the feature data frame, to use as input for a classifier in interaction prediction

[Package PrInCE version 1.3.0 Index]