Taks 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_fit_stats(mCal, mPrd, fobs, xpr, nbK)
a numeric matrix. This matrix is the matrix of performances predicted by the tree model.
a numeric matrix. This matrix is the matrix of performances predicted by cross-validation.
a numeric vector. The vector fobs
contains the
quantitative performances of assemblages.
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.
Return statistics of model goodness-of-fit.
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 third argument fobs
is the vector of observed values.