compute_targetVal
compute_targetVal.Rd
This function computes the target values for ensemble learning architecture
Usage
compute_targetVal(
QC_num,
sampleType,
batchID = NULL,
targetVal_method = c("mean", "median"),
targetVal_batchWise = FALSE,
targetVal_removeOutlier = !targetVal_batchWise,
coerce_numeric = FALSE
)
Arguments
- QC_num
a numeric data.frame including the metabolite values of quality control (QC) samples. Missing values and infinite values will not be taken into account. Row: sample. Column: metabolite variable. See Examples.
- sampleType
a vector corresponding to
QC_num
to specify the type of each QC sample. QC samples of the same type should have the same type name. See Examples.- batchID
a vector corresponding to
QC_num
to specify the batch of each sample. Ignored iftargetVal_batchWise = FALSE
. See Examples.- targetVal_method
a character string specifying how the target values are computed. Can be
"mean"
(default) or"median"
. See Details.- targetVal_batchWise
logical. If
TRUE
, the target values will be computed based on each batch, otherwise, based on the whole dataset. SettingTRUE
might be useful if your dataset has very obvious batch effects, but this may also make the algorithm less robust. See Details. Default:FALSE
.- targetVal_removeOutlier
logical. If
TRUE
, outliers will be removed before the computation. Outliers are determined with 1.5 * IQR (interquartile range) rule. We recommend turning this off when the target values are computed based on batches. See Details. Default:!targetVal_batchWise
.- coerce_numeric
logical. If
TRUE
, values inQC_num
will be coerced to numeric before the computation. The columns cannot be coerced will be removed (with warnings). See Examples. Default:FALSE
.