This scorer returns the trimmed mean score(s). See the Details section below for further information.
Usage
trimmedMeanScorer(
x,
i = NULL,
trim = 0,
na.rm = TRUE,
transform.fun = NULL,
transform.args = list(),
transform.sub = F
)Arguments
- x
a numerical matrix features-by-samples
- i
(optional) numerical vector giving the (row) position in
xor character vector matching the (row) names inx. Ifmissingori = NULL, the entirexis considered for the computation of the score- trim
the fraction (0 to 0.5) of observations to be trimmed from each end of
xbefore the mean is computed. Values of trim outside that range are taken as the nearest endpoint.- na.rm
logical, whether to remove
NAvalues fromxbefore computation- transform.fun
function to transform the data. If provided,
xis transformed (x = transform.fun(x, transform.args)) before the computation of the scores. SeegetDataTransformerfor further details about built-in options- transform.args
list of parameters to the data transformation function
- transform.sub
logical, whether to transform
xafter it is subset fori(used to speedup computation). Default isFALSE, meaning the transformation would be applied directly toxprovided in input
Value
A numerical value representing the computed score.
A default NA value is returned if the score can't be
computed, or if i values are not present in x.
Details
This function applies trimmedMean
to each column of the input matrix.