sub-sub-Xfgpm-method: Refit a 'fgpm' model in a 'Xfgpm' object

[[,Xfgpm-methodR Documentation

Refit a fgpm model in a Xfgpm object

Description

Refit a fgpm model as described in a Xfgpm object.

Usage

## S4 method for signature 'Xfgpm'
x[[i]]

Arguments

x

A Xfgpm object.

i

An integer giving the index of the model to refit. The models are in decreasing fit quality as assessed by the Leave-One-Out Q^2.

Caution

While the syntax may suggest that the function extracts a fitted fgpm model, this not true. The fgpm model is refitted using the call that was used when this model was assessed. The refitted fgpm model keeps the same structural parameters as the one assessed (active variables, kernel, ...), but since the optimization uses random initial values, the optimized hyper-parameters may differ from those of the corresponding fgpm in the Xfgpm object x. As a result, the model can be different and show a different LOO performance.

Note

The slot @model returns the best fgpm as assessed in a Xfgm model x. So this model can be expected to be close to the same as x[[1]]. Yet due to the refit, the two models x@model and x[[1]] can differ, see the explanations in the Caution section.

See Also

The modelDef function to extract the definition of a fgpm model e.g., to evaluate it using new data sIn, fIn and sOut.

Examples

## see `?xm` to see how to recreate the pre-caclulated `Xfgpm` object `xm`.
xm[[2]]


funGp documentation built on May 29, 2024, 8 a.m.