polyLeg: Calculate Legendre Polynomials on a Dataset

Description Usage Arguments Details Value References See Also Examples

Description

This function calculates Legendre polynomials, optionally reducted to the most significant monomials, on a user dataset.

Legendre polynomials are computed after calibration within the bounds [-1, +1].

Usage

1
polyLeg(lhs, Y, degree, forward=NULL)

Arguments

lhs

matrix with as many columns as inputs. Dataset of inputs. Generally, a space filling design is used for forming this dataset. Typically, this is a simple LHS (see McKay, 1979) or a modified LHS.

Y

vector of length equal to the number of rows in lhs. Model outputs.

degree

integer greater than 1 and less than 11. Degree of the polynomial.

forward

NULL or an integer equal to the required number of monomials. A null value (the default), or a value less than the number of inputs or greater than the total number of monomials, means that all the monomials are kept. See details.

Details

When the value of the argument forward is non NULL, it should be an integer equal to the required number of the monomials (let say q). The q monomials are selected, among all the monomials of the full polynomial, by all the linear simple regressions of the output versus all the monomials. Those associated with the q largest R^2 values are kept.

Value

An objet of class PCEpoly.

References

McKay, M.D. and Beckman, R.J. and Conover, W.J. 1979. “A Comparison of Three Methods for Selecting Values of Input Variables in the Analysis of Output from a Computer Code”.In Technometrics, 21 (2). 239-245p.

See Also

  • Function analyticsPolyLeg builds Legendre polynomials from a simulated dataset.

  • Function calcPLSPCE calculates PLS-PCE sensivity indexes from the returned object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
### Load the dataset
load(system.file("extdata", "ishigami200.Rda", package="plspolychaos"))
X <- ishi200[, -ncol(ishi200)] # inputs
Y <- ishi200[,  ncol(ishi200)] # output
degree <- 6 # polynomial degree
### Creation of the full polynomials
pce <- polyLeg(X, Y, degree) 
print(pce)
### Selection of the 50 most significant monomials
pcef <- polyLeg(X, Y, degree, forward=50)
print(pcef)


Search within the plspolychaos package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.