OneHotEncoding: Perform one-hot encoding of the sample metadata. This is...

View source: R/pairwisepredictionfunctions.R

OneHotEncodingR Documentation

Perform one-hot encoding of the sample metadata. This is useful when categorical covariates are used. This one-hot encoding will be used later in predictions, and will simplify the prediction process because the names of the result columns and the covariates will match up.

Description

Perform one-hot encoding of the sample metadata. This is useful when categorical covariates are used. This one-hot encoding will be used later in predictions, and will simplify the prediction process because the names of the result columns and the covariates will match up.

Usage

OneHotEncoding(inputData, covar = c())

Arguments

inputData

An object with the following fields:

covar

The clinical covariates to include in the model. These should be the same covariates that were included when running the IntLIM linear models.

Value

A list with two elements: (1) the new set of covariates, and (2) the new sample meta data, as encoded.


ncats/MultiOmicsGraphPrediction documentation built on Aug. 23, 2023, 9:19 a.m.