| | 1 | = BysVecLinReg = |
| | 2 | |
| | 3 | BysVecLinReg is an open source [wiki:TolPackageRulesAndComments TOL Package] published as partt of [wiki:OfficialTolArchiveNetwork Official Tol Archive Network] |
| | 4 | |
| | 5 | BysVecLinReg yields for Bayesian simulator of Vectorial Linear Regression with |
| | 6 | arbitrary constraining inequations and lineal constraining equations. |
| | 7 | |
| | 8 | The method used to solve it in this package is based on |
| | 9 | [https://www.tol-project.org/export/HEAD/tolp/OfficialTolArchiveNetwork/BysVecLinReg/doc/bayes-linear-minka.pdf Bayesian linear regression Thomas Minka (2001)] using invariant scale prior over |
| | 10 | [[LatexEquation(A)]] and inverse prior over [[LatexEquation(V)]] |
| | 11 | |
| | 12 | == Vectorial linear regression == |
| | 13 | |
| | 14 | Vectorial linear regression equations are [[BR]] |
| | 15 | |
| | 16 | [[LatexEquation(Y=A \cdot X + E)]] [[BR]] |
| | 17 | |
| | 18 | where [[BR]] |
| | 19 | |
| | 20 | * [[LatexEquation(Y\in\mathbb{R}^{d\times N} )]] is the multivariant known |
| | 21 | output matrix, where each row is a different output vector |
| | 22 | [[LatexEquation(y_{n}\in\mathbb{R}^{N} )]][[BR]] |
| | 23 | * [[LatexEquation(X\in\mathbb{R}^{m\times N} )]] is the known and full rank |
| | 24 | input matrix, where each row is a different input vector |
| | 25 | [[LatexEquation(x_{n}\in\mathbb{R}^{N} )]] [[BR]] |
| | 26 | * [[LatexEquation(A\in\mathbb{R}^{d\times m} )]] has the unknown regression |
| | 27 | coefficients that we want to estimate [[BR]] |
| | 28 | * [[LatexEquation(E\in\mathbb{R}^{d\times N} )]] is the multivariant |
| | 29 | residuals, where each row is the residuals vector |
| | 30 | [[LatexEquation(e_{n}\in\mathbb{R}^{N} )]] corresponding to output |
| | 31 | [[LatexEquation(y_{n} )]] |
| | 32 | |
| | 33 | All residuals inside the same row are incorrelated normal, but resiudals in |
| | 34 | the same column [[LatexEquation(j)]] are [[BR]] |
| | 35 | |
| | 36 | [[LatexEquation(e_{.,j} \sim N\left(0,V\right) E\in\mathbb{R}^{d\times d} \forall j=1 \ldots d )]][[BR]] |
| | 37 | |
| | 38 | where [[LatexEquation(V)]] is symmetric positive definite and unknown, but the |
| | 39 | same for each column.[[BR]] |
| | 40 | |
| | 41 | Minka defines also the known data pair [[LatexEquation(D = left(Y,Xright))]] |
| | 42 | that will be used just to get more compact conditioninig expressions. |
| | 43 | |
| | 44 | == Arbitrary constraining inequations == |
| | 45 | |
| | 46 | We will extend the model scope with arbitrary non null meassured restrictions |
| | 47 | over parameters inside [[LatexEquation(A)]] by means of adding a set of |
| | 48 | [[LatexEquation(r)]] inequations defining a feasible region [[BR]] |
| | 49 | |
| | 50 | [[LatexEquation(\Omega = \left\{ A\in\mathbb{R}^{d\times m} \mid F\left(A\right) \le 0 \right\})]] [[BR]] |
| | 51 | |
| | 52 | being [[BR]] |
| | 53 | |
| | 54 | [[LatexEquation( F\left(A\right):\mathbb{R}^{d\times m}\longrightarrow\mathbb{R}^{r} )]] [[BR]] |
| | 55 | |
| | 56 | the arbitrary constraining function. [[BR]] |
| | 57 | |
| | 58 | == Invariant-scale prior over coefficient matrix == |
| | 59 | |
| | 60 | Although Minka not explicitly stated in any place, under the invariant prior |
| | 61 | follows that [[LatexEquation(X)]] must be full-rank [[LatexEquation(m <= N)]] |
| | 62 | because [[LatexEquation(X W X ^ T)]] must be nonsingular with |
| | 63 | [[LatexEquation(W = \alpha I_{m})]], where [[LatexEquation(\alpha)]] is the |
| | 64 | scale-invariant parameter governing the prior and estimated more |
| | 65 | forward to maximize the evidence of the data, which depends on the assumptions |
| | 66 | the model. |
| | 67 | |