| 1 | <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 2 | <title>TableOfReal: To Discriminant</title> |
| 3 | <style> |
| 4 | td { padding-left: 5pt; padding-right: 5pt; } |
| 5 | th { padding-left: 5pt; padding-right: 5pt; } |
| 6 | code { white-space: pre-wrap; } |
| 7 | dd { white-space: pre-wrap; } |
| 8 | </style> |
| 9 | </head><body bgcolor="#FFFFFF"> |
| 10 | |
| 11 | <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b> |
| 12 | TableOfReal: To Discriminant |
| 13 | </b></font></table></table> |
| 14 | <p>A command that creates a <a href="Discriminant.html">Discriminant</a> object from every selected <a href="TableOfReal.html">TableOfReal</a> object. Row labels in the table indicate group membership.</p> |
| 15 | <h2>Algorithm</h2> |
| 16 | <p>We solve for directions <b>x</b> that are eigenvectors of the generalized eigenvalue equation:</p> |
| 17 | <table width="100%" style="white-space:pre-wrap"><tr><td align=middle><b><i>B</i></b> <b>x</b> - <i>λ</i> <b><i>W</i></b> <b>x</b> = 0,</table> |
| 18 | <p>where <b><i>B</i></b> and <b><i>W</i></b> are the between-groups and the within-groups sums of squares and cross-products matrices, respectively. Both <b><i>B</i></b> and <b><i>W</i></b> are symmetric matrices. Standard formula show that both matrices can also be written as a matrix product. The formula above then transforms to:</p> |
| 19 | <table width="100%" style="white-space:pre-wrap"><tr><td align=middle><b><i>B</i></b><sub>1</sub>′<b><i>B</i></b><sub>1</sub> <b>x</b> - <i>λ</i> <b><i>W</i></b><sub>1</sub>′<b><i>W</i></b><sub>1</sub> <b>x</b> = 0</table> |
| 20 | <p>The equation can be solved with the <a href="generalized_singular_value_decomposition.html">generalized singular value decomposition</a>. This procedure is numerically very stable and can even cope with cases when both matrices are singular.</p> |
| 21 | <p>The a priori probabilities in the Discriminant will be calculated from the number of <i>training</i> vectors <i>n</i><sub><i>i</i></sub> in each group:</p> |
| 22 | <table width="100%" style="white-space:pre-wrap"><tr><td align=middle><i>aprioriProbability</i><sub><i>i</i></sub> = <i>n</i><sub><i>i</i></sub> / Σ<sub><i>k</i>=1..<i>numberOfGroups</i></sub> <i>n</i><sub><i>k</i></sub></table> |
| 23 | <h3>Links to this page</h3> |
| 24 | <ul> |
| 25 | <li><a href="Discriminant_analysis.html">Discriminant analysis</a> |
| 26 | <li><a href="TableOfReal__To_Configuration__lda____.html">TableOfReal: To Configuration (lda)...</a> |
| 27 | </ul> |
| 28 | <hr> |
| 29 | <address> |
| 30 | <p>© djmw 19990104</p> |
| 31 | </address> |
| 32 | </body> |
| 33 | </html> |