the vector-to-scalar function to fit.
the dimensionality of the domain of f
Given a design matrix and response vector, use multiple regression to fit the surface, i.
Given a design matrix and response vector, use multiple regression to fit the surface, i.e., determine the coefficients of the regression equation.
the design matrix and response vector grouped in a tuple
Given a center point x, form a square grid around it.
Given a center point x, form a square grid around it. This can be used to create a design matrix for use in multiple regression.
the center point/vector of the grid
the current dimension (facilitates recursion)
the distance to move on each step
move m steps above and below x(i) for each dimension i
Given a vector 'x', compute the values for all of its quadratic, linear and constant forms/terms, returning them as a vector.
Given a vector 'x', compute the values for all of its quadratic, linear and constant forms/terms, returning them as a vector. for 1D: VectorD (1., x(0), x(0)~2.) for 2D: VectorD (1., x(0), x(0)~2., x(1), x(1)*x(0), x(1)~^2.)
the source vector for creating forms/terms
Given a point x, use the quadratic regression equation to estimate a value for the function at x.
Given a point x, use the quadratic regression equation to estimate a value for the function at x. for 1D: b(0) + b(1)*x(0) + b(2)*x(0)~2. for 2D: b(0) + b(1)*x(0) + b(2)*x(0)~2. + b(3)*x(1) + b(4)*x(1)*x(0) + b(5)*x(1)~^2.
the point whose functional value is to be predicted
Given a grid of design points, create a design matrix 'xx' and response vector 'yy' returning them as a tuple.
The
QuadraticFit
class uses multiple regression to fit a quadratic surface to the function 'f'. This is useful when computing 'f' is costly, for example in simulation optimization. The fit is over a multi-dimensional grid and can be used for interpolation and limited extrapolation.