validate_amean_bymot_jack_xpr: Predicting the performances by assembly motif using jackknife...

Description Usage Arguments Details Value See Also

View source: R/validating_jack.R

Description

Take a vector fobs of assembly performances and return a vector of performances predicted as the arithmetic mean of performances of other assemblages that share the same assembly motif.

Assembly motifs are labelled in the vector assMotif. Experiments are labelled in the vector xpr.

Usage

1
validate_amean_bymot_jack_xpr(fobs, assMotif, jack, xpr)

Arguments

fobs

a numeric vector. The vector fobs contains the quantitative performances of assemblages.

assMotif

a vector of labels of length(fobs). The vector assMotif contains the assembly motifs of assemblages.

jack

an integer vector of length 2. The vector specifies the parameters for jackknife method. The first integer jack[1] specifies the size of subset, the second integer jack[2] specifies the number of subsets.

xpr

a vector of numerics of length(fobs). The vector xpr contains the weight of each experiment, and the labels (in names(xpr)) of different experiments. The weigth of each experiment is used in the computation of the Residual Sum of Squares in the function rss_clustering. The used formula is rss if each experiment has the same weight. The used formula is wrss (barycenter of RSS for each experiment) if each experiment has different weights. All assemblages that belong to a given experiment should then have a same weigth. Each experiment is identified by its names (names(xpr)) and the RSS of each experiment is weighted by values of xpr. The vector is generated by the function stats::setNames.

Details

Predicted performances are computed using arithmetic mean (opt.mean = "amean") of performances of assemblages that share a same assembly motif (opt.model = "bymot").

The assemblages belonging to a same assembly motif are divided into jack[2] subsets of jack[1] assemblages. Prediction is computed by excluding jack[1] assemblages, including the assemblage to predict. If the total number of assemblages belonging to the assembly motif is lower than jack[1]*jack[2], prediction is computed by Leave-One-Out (LOO).

Value

Return a vector of length(fobs). Its values are computed as the arithmetic mean of performances of assemblages that share a same assembly motif, experiment by experiment, by excluding a subset of assemblages containing the assemblage to predict.

See Also

validate_amean_byelt_jack_xpr, validate_gmean_bymot_jack_xpr, validate_gmean_byelt_jack_xpr


functClust documentation built on Dec. 2, 2020, 5:06 p.m.