Take a matrix of calibrations, a matrix of predictions, the vector of observed performances, the number of observed assembly motifs, and return a matrix of statistics for model goodness-of-fit.
compute_ftree_stats(mCal, mPrd, mStats, fobs, xpr, nbK)
a numeric matrix. This matrix is the matrix of performances predicted by the model.
a numeric matrix. This matrix is the matrix of performances predicted by cross-validation.
a numeric matrix. This matrix is the matrix of statistics of model goodness-of-fit.
a numeric vector. This vector is the vector of observed performances.
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 xpr
is generated
by the function stats::setNames
.
an integer. This integer corresponds to the number of observed assembly motifs.
tCal
: a matrix of the valid part of hierarchical tree,
that is the part of tree that increases predictive ability of model,
tCal
and tPrd
: the valid part of hierarchical tree,
that is the part of tree that increases predictive ability of model,
tStats
: statistics of tree model goodness-of-fit,
tNbcl
: the number of clusters used or
computing each performance.
Be careful, the matrix order is not ramdon.
The first argument mCal
is matrix of modelled values.
The second argument mPrd
is matrix of values
predicted by cross-validation.
The fourth argument fobs
is the vector of observed values.