The fgpm_factory function returns an object of class "Xfgpm" with the function calls of all the evaluated models stored in the @log.success@args and @log.crashes@args slots. The which_on function interprets the arguments linked to any structural configuration and returns a list with two elements: (i) an array of indices of the scalar inputs kept active; and (ii) an array of indices of the functional inputs kept active.

which_on(sIn = NULL, fIn = NULL, args)

Arguments

sIn

An optional matrix of scalar input coordinates with all the orignal scalar input variables. This is used only to know the total number of scalar input variables. Any matrix with as many columns as original scalar input variables could be used instead.

fIn

An optional list of functional input coordinates with all the original functional input variables. This is used only to know the total number of functional input variables. Any list with as many elements as original functional input variables could be used instead.

args

An object of class "modelCall", which specifies the model structure for which the active inputs should be extracted.

Value

An object of class "list", containing the following information extracted from the

args parameter: (i) an array of indices of the scalar inputs kept active; and (ii) an array of indices of the functional inputs kept active.

References

Betancourt, J., Bachoc, F., Klein, T., Idier, D., Rohmer, J., and Deville, Y. (2024), "funGp: An R Package for Gaussian Process Regression with Scalar and Functional Inputs". Journal of Statistical Software, 109, 5, 1--51. (doi:10.18637/jss.v109.i05 )

Betancourt, J., Bachoc, F., Klein, T., Idier, D., Rohmer, J., and Deville, Y. (2024), "funGp: An R Package for Gaussian Process Regression with Scalar and Functional Inputs". Journal of Statistical Software, 109, 5, 1--51. (doi:10.18637/jss.v109.i05 )

Betancourt, J., Bachoc, F., and Klein, T. (2020), R Package Manual: "Gaussian Process Regression for Scalar and Functional Inputs with funGp - The in-depth tour". RISCOPE project. [HAL]

See also

* get_active_in for details on how to obtain the data structures linked to the active inputs;

* modelCall for details on the args argument;

* fgpm_factory for funGp heuristic model selection;

* Xfgpm for details on object delivered by fgpm_factory.

Author

José Betancourt, François Bachoc, Thierry Klein and Jérémy Rohmer

Examples

# extracting the indices of the active inputs in an optimized model________________________
# use precalculated Xfgpm object named xm
# active inputs in the best model
xm@log.success@args[[1]] # the full fgpm call
#> [1] fgpm(sIn = sIn[,2:5], fIn = fIn, sOut = sOut, f_disType = "L2_byindex", f_pdims = c(1, 3), f_basType = "B-splines", kerType = "gauss")
set.seed(100)
n.tr <- 32
sIn <- expand.grid(x1 = seq(0,1,length = n.tr^(1/5)), x2 = seq(0,1,length = n.tr^(1/5)),
x3 = seq(0,1,length = n.tr^(1/5)), x4 = seq(0,1,length = n.tr^(1/5)),
x5 = seq(0,1,length = n.tr^(1/5)))
fIn <- list(f1 = matrix(runif(n.tr*10), ncol = 10), f2 = matrix(runif(n.tr*22), ncol = 22))
which_on(sIn, fIn, xm@log.success@args[[1]]) # only the indices extracted by which_on
#> $s.inds
#> [1] 2 3 4 5
#> 
#> $f.inds
#> [1] 1 2
#>