weightMatrixToVector: Convert the weights matrix to a vector

Description Usage Arguments Details Value

Description

Initially, a weight is computed for each model. Then, the weight matrix is created, and this contains those weights if they are valid at the current location (i.e. if that particular model is allowed to extrapolate to the current point). It may be useful to convert the weight matrix back to a vector (in particular, for plotting the weights of each base learner).

Usage

1
weightMatrixToVector(weightMatrix)

Arguments

weightMatrix

The weights matrix, as returned by computeEnsembleWeights.

Details

This function works by finding which row of the weights matrix has the fewest number of 0's. This row will correspond to an interpolation or non-missing row, and thus all models will be valid at this point. Since all models are valid here, the weights at this point will correspond to the original weight vector, and so we just return that row.

Value

A vector of weights that is the original weight vector prior to being extended to a matrix.


SWS-Methodology/faoswsImputation documentation built on May 9, 2019, 11:48 a.m.