compute_fit_stats: Statistics of model goodness-of-fit

Description Usage Arguments Details Value

View source: R/validating.R

Description

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.

Usage

1
compute_fit_stats(mCal, mPrd, fobs, xpr, nbK)

Arguments

mCal

a numeric matrix. This matrix is the matrix of performances predicted by the tree model.

mPrd

a numeric matrix. This matrix is the matrix of performances predicted by cross-validation.

fobs

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

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 xpr is generated by the function stats::setNames.

nbK

an integer. This integer corresponds to the number of observed assembly motifs.

Details

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.

Value

Return statistics of model goodness-of-fit.


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