linear algebra - How to solve an equation of the form p = aw + bx + cy + dz where I have thousands of a-e data sets? -
i have thousands of data sets of (p, w, x, y, z), , i'm pretty sure fit equation of form p= aw + bx + cy + dz, p rounded in way.
i'd write program solve constants a, b, c, , d, given data sets variables , result have. alternatively, if there software can this, great. suggestions, or google keywords can use further research?
notice that, if points fit equation perfectly, need 4 data determine parameters , not "thousand". remaining points either fit equations (hence redundant) or cannot made fit equation (i.e. problem impossible)
if instead fit you're looking not perfect , need find parameters a,b,c,d optimal fit (i.e. minimize square errors), need linear regression.
please notice each of equations define 1 of datapoint can written in form
ax = b
where row-vectors of 4 values , x column-vector of 4 values. reason,
- the vector summarizes info in writing carried tuple (a, b, c, d)
- the vector x summarizes info in writing carried tuple (w, x, y, z).
- b is, then, scalar.
at point may google "linear regression" , apply knowledge. :) there several software packages this, matlab, octave, excel can it. :)
Comments
Post a Comment