Equations for 2 variable Linear Regression

a 夏天 提交于 2019-12-03 22:17:10

so you have three linear equations

k = aX1 + bY1 + cZ1
k = aX2 + bY2 + cZ2
k = aX3 + bY3 + cZ3

What you can do is rewrite it as matriz

| x1 y1 z1 | | a |   | k |
| x2 y2 z2 | | b | = | k |
| x3 y3 y3 | | c |   | k |

to work out [a b c ] do the following matrix operation

| a |              | x1 y1 z1 |     | k |
| b | =  inverse(  | x2 y2 z2 | )   | k |
| c |              | x3 y3 y3 |     | k |

The formula for a 3x3 matrix inverse can be found here

Yes, it's an easy linear algebra problem if you think of it the way Gil Strang does it. Here's a written explanation.

Can you use MatLab or does the calculation have to occur inside your software?

MatLab instructions on multiple regression analysis.

Integrating MatLab with C#.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!