340 likes | 520 Views
Data Modeling and Parameter Estimation. Nov 9, 2005 PSCI 702. Predictive and Descriptive Models. Predictive models attempt to predict the value of a variable, given the values of other independent variables. (regression)
E N D
Data Modeling and Parameter Estimation Nov 9, 2005 PSCI 702
Predictive and Descriptive Models • Predictive models attempt to predict the value of a variable, given the values of other independent variables. (regression) • Descriptive models don’t make distinction between variables. There is no such thing as “independent variable”. (mean, variance)
Least Square Fit Approximations Suppose we want to fit the data set.
Least Square Fit Approximations We would like to find the best straight line to fit the data? y = -1.11733x + 8.66608
Nonlinear Least Squared Approximation Method Take the natural log of the equations and
Nonlinear Least Square Example The equation is:
Continuous Least Square Functions Instead of modeling a known complex function over a region, we would like to model the values with a simple polynomial. This technique uses a least squares over a continuous region. The coefficients of the polynomial can be determined using same technique that was used in discrete method.
Continuous Least Square Functions The technique minimizes the error of the function uses an integral. where
Continuous Least Square Functions Take the derivative of the error with respect to the coefficients and set it equal to zero. And compute the components of the coefficient matrix. The right hand side of the matrix will be the function we are modeling times a x value.
Continuous Least Square Function Example Given the following function: from 0 to 1 Model the function with a quadratic polynomial.
Continuous Least Square Function Example The integral for the error is:
Continuous Least Square Function Example The integral for the components are:
Continuous Least Square Function Example The coefficient matrix becomes:
Continuous Least Square Function Example The right-hand side of the equation becomes:
Continuous Least Square Function Example The function becomes : f(x) = 0.3328 -2.5806x + 9.1642x2
Legendre Polynomial The Legendre polynomials are a set of orthogonal functions, which can be used to represent a function as components of a function.
Legendre Polynomial These function are orthogonal over a range [ -1, 1 ]. This range can be scaled to fit the function. The orthogonal functions are defined as:
Legendre Polynomial The Legendre functions are:
Legendre Polynomial How would you work with a least square fit of a function.
Legendre Polynomial How would you work with a least square fit of a function.
Legendre Polynomial The coefficient a0 is determined by the orthogonality of the Legendre polynomials:
Legendre Polynomial Example Given a simple polynomial: We want to throw a loop, let’s model it from 0 to 4 with f(x):
Legendre Polynomial Example The first step will be to scale the function: We know that at the ends are 0 and 4 for x and -1 to 1 for u so
Legendre Polynomial Example The coefficients are
Legendre Polynomial Example The Legendre functions must be adjusted to handle the scaling:
DHM • Find all T* that make the sin()=1 • Find the period of the sin function • Find ω, and φ. • Estimate X0. • Estimate A and β. • Determine the error between theoretical function and the data. Adjust X0 to improve this value.