modelComparison function

Comparison of different types of metamodels

Comparison of different types of metamodels

modelComparison fits different metamodels and returns R2 and RMSE criteria relating to each.

modelComparison(X,Y, type="all",K=10,test=NULL,...)

Arguments

  • X: a data.frame containing the design of experiments

  • Y: a vector containing the response variable

  • type: a vector containing the type of models to compare.

    The default value is "all"=c("Linear", "StepLinear","Additive", "PolyMARS","MARS","Kriging")

  • K: the number of folds for cross-validation (default value is set at 10)

  • test: a data.frame containing the design and the response of a test set when available, the prediction criteria will be evaluated on the test design (default corresponds to no test set)

  • ...: according to the type argument, parameters can be specified (for example, formula and penalty for a stepwise procedure)

Returns

A list containing two fields if the argument test equal NULL and three fields otherwise : - Learning: R2 and RMSE criteria evaluated from learning set,

  • CV: Q2 and RMSE_CV criteria using K-fold cross-validation,

  • Test: R2 and RMSE criteria on the test set.

A graphical tool to compare the value of the criteria is proposed.

See Also

modelFit and crossValidation

Author(s)

D. Dupuy

Examples

## Not run: data(dataIRSN5D) X <- dataIRSN5D[,1:5] Y <- dataIRSN5D[,6] data(testIRSN5D) library(gam) library(mda) library(polspline) crit <- modelComparison(X,Y, type="all",test=testIRSN5D) crit2 <- modelComparison(X,Y, type=rep("StepLinear",5),test=testIRSN5D, penalty=c(1,2,5,10,20),formula=Y~.^2) ## End(Not run)
  • Maintainer: C. Helbert
  • License: GPL-3
  • Last published: 2023-12-04

Useful links