This example uses linear discrimination with equal prior probabilities on Fisher's (1936) iris data. This example illustrates the use of the DiscriminantAnalysis class.
using System; using Imsl.Stat; using PrintMatrix = Imsl.Math.PrintMatrix; public class DiscriminantAnalysisEx1 { public static void Main(String[] args) { double[,] xorig = { {1.0, 5.1, 3.5, 1.4, .2}, {1.0, 4.9, 3.0, 1.4, .2}, {1.0, 4.7, 3.2, 1.3, .2}, {1.0, 4.6, 3.1, 1.5, .2}, {1.0, 5.0, 3.6, 1.4, .2}, {1.0, 5.4, 3.9, 1.7, .4}, {1.0, 4.6, 3.4, 1.4, .3}, {1.0, 5.0, 3.4, 1.5, .2}, {1.0, 4.4, 2.9, 1.4, .2}, {1.0, 4.9, 3.1, 1.5, .1}, {1.0, 5.4, 3.7, 1.5, .2}, {1.0, 4.8, 3.4, 1.6, .2}, {1.0, 4.8, 3.0, 1.4, .1}, {1.0, 4.3, 3.0, 1.1, .1}, {1.0, 5.8, 4.0, 1.2, .2}, {1.0, 5.7, 4.4, 1.5, .4}, {1.0, 5.4, 3.9, 1.3, .4}, {1.0, 5.1, 3.5, 1.4, .3}, {1.0, 5.7, 3.8, 1.7, .3}, {1.0, 5.1, 3.8, 1.5, .3}, {1.0, 5.4, 3.4, 1.7, .2}, {1.0, 5.1, 3.7, 1.5, .4}, {1.0, 4.6, 3.6, 1.0, .2}, {1.0, 5.1, 3.3, 1.7, .5}, {1.0, 4.8, 3.4, 1.9, .2}, {1.0, 5.0, 3.0, 1.6, .2}, {1.0, 5.0, 3.4, 1.6, .4}, {1.0, 5.2, 3.5, 1.5, .2}, {1.0, 5.2, 3.4, 1.4, .2}, {1.0, 4.7, 3.2, 1.6, .2}, {1.0, 4.8, 3.1, 1.6, .2}, {1.0, 5.4, 3.4, 1.5, .4}, {1.0, 5.2, 4.1, 1.5, .1}, {1.0, 5.5, 4.2, 1.4, .2}, {1.0, 4.9, 3.1, 1.5, .2}, {1.0, 5.0, 3.2, 1.2, .2}, {1.0, 5.5, 3.5, 1.3, .2}, {1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.8}, {3.0, 7.7, 3.8, 6.7, 2.2}, {3.0, 7.7, 2.6, 6.9, 2.3}, {3.0, 6.0, 2.2, 5.0, 1.5}, {3.0, 6.9, 3.2, 5.7, 2.3}, {3.0, 5.6, 2.8, 4.9, 2.0}, {3.0, 7.7, 2.8, 6.7, 2.0}, {3.0, 6.3, 2.7, 4.9, 1.8}, {3.0, 6.7, 3.3, 5.7, 2.1}, {3.0, 7.2, 3.2, 6.0, 1.8}, {3.0, 6.2, 2.8, 4.8, 1.8}, {3.0, 6.1, 3.0, 4.9, 1.8}, {3.0, 6.4, 2.8, 5.6, 2.1}, {3.0, 7.2, 3.0, 5.8, 1.6}, {3.0, 7.4, 2.8, 6.1, 1.9}, {3.0, 7.9, 3.8, 6.4, 2.0}, {3.0, 6.4, 2.8, 5.6, 2.2}, {3.0, 6.3, 2.8, 5.1, 1.5}, {3.0, 6.1, 2.6, 5.6, 1.4}, {3.0, 7.7, 3.0, 6.1, 2.3}, {3.0, 6.3, 3.4, 5.6, 2.4}, {3.0, 6.4, 3.1, 5.5, 1.8}, {3.0, 6.0, 3.0, 4.8, 1.8}, {3.0, 6.9, 3.1, 5.4, 2.1}, {3.0, 6.7, 3.1, 5.6, 2.4}, {3.0, 6.9, 3.1, 5.1, 2.3}, {3.0, 5.8, 2.7, 5.1, 1.9}, {3.0, 6.8, 3.2, 5.9, 2.3}, {3.0, 6.7, 3.3, 5.7, 2.5}, {3.0, 6.7, 3.0, 5.2, 2.3}, {3.0, 6.3, 2.5, 5.0, 1.9}, {3.0, 6.5, 3.0, 5.2, 2.0}, {3.0, 6.2, 3.4, 5.4, 2.3}, {3.0, 5.9, 3.0, 5.1, 1.8} }; int[] ipermu = new int[]{2, 3, 4, 5, 1}; double[,] x = new double[xorig.GetLength(0),xorig.GetLength(1)]; for (int i = 0; i < xorig.GetLength(0); i++) { for (int j = 1; j < xorig.GetLength(1); j++) { x[i,j - 1] = xorig[i,j]; } } for (int i = 0; i < xorig.GetLength(0); i++) { x[i,4] = xorig[i,0]; } int nvar = x.GetLength(1) - 1; DiscriminantAnalysis da = new DiscriminantAnalysis(nvar, 3); da.CovarianceComputation = Imsl.Stat.DiscriminantAnalysis.CovarianceMatrix.Pooled; da.ClassificationMethod = Imsl.Stat.DiscriminantAnalysis.Classification.Reclassification; da.Update(x); new PrintMatrix("Xmean are: ").SetPageWidth(80).Print(da.GetMeans()); new PrintMatrix("Coef: ").SetPageWidth(80).Print(da.GetCoefficients()); new PrintMatrix("Counts: ").SetPageWidth(80).Print(da.GetGroupCounts()); new PrintMatrix("Stats: ").SetPageWidth(80).Print(da.GetStatistics()); new PrintMatrix("ClassMembership: ").SetPageWidth(80).Print( da.GetClassMembership()); new PrintMatrix("ClassTable: ").SetPageWidth(80).Print(da.GetClassTable()); double[,,] cov = da.GetCovariance(); double[,] tmpCov = new double[cov.GetLength(1), cov.GetLength(2)]; for (int i = 0; i < cov.GetLength(0); i++) { for (int j = 0; j < cov.GetLength(1); j++) for (int k = 0; k < cov.GetLength(2); k++) tmpCov[j, k] = cov[i, j, k]; new PrintMatrix ("Covariance Matrix " + i + " : ").SetPageWidth(80).Print(tmpCov); } new PrintMatrix("Prior : ").SetPageWidth(80).Print(da.GetPrior()); new PrintMatrix("PROB: ").SetPageWidth(80).Print(da.GetProbability()); new PrintMatrix("MAHALANOBIS: ").SetPageWidth(80).Print(da.GetMahalanobis()); Console.Out.WriteLine("nrmiss = " + da.NRowsMissing); } }
Xmean are: 0 1 2 3 0 5.006 3.428 1.462 0.246 1 5.936 2.77 4.26 1.326 2 6.588 2.974 5.552 2.026 Coef: 0 1 2 3 0 -86.308469973674 23.5441667229203 23.5878704955898 -16.4306390229439 1 -72.8526074006422 15.6982090760379 7.07250983729562 5.21145093416415 2 -104.36831998645 12.4458489937766 3.68527961207532 12.7665449735348 4 0 -17.3984107815644 1 6.43422920040657 2 21.0791130134185 Counts: 0 0 50 1 50 2 50 Stats: 0 0 147 1 NaN 2 NaN 3 NaN 4 NaN 5 NaN 6 NaN 7 -9.95853877004797 8 50 9 50 10 50 11 150 ClassMembership: 0 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 2 51 2 52 2 53 2 54 2 55 2 56 2 57 2 58 2 59 2 60 2 61 2 62 2 63 2 64 2 65 2 66 2 67 2 68 2 69 2 70 3 71 2 72 2 73 2 74 2 75 2 76 2 77 2 78 2 79 2 80 2 81 2 82 2 83 3 84 2 85 2 86 2 87 2 88 2 89 2 90 2 91 2 92 2 93 2 94 2 95 2 96 2 97 2 98 2 99 2 100 3 101 3 102 3 103 3 104 3 105 3 106 3 107 3 108 3 109 3 110 3 111 3 112 3 113 3 114 3 115 3 116 3 117 3 118 3 119 3 120 3 121 3 122 3 123 3 124 3 125 3 126 3 127 3 128 3 129 3 130 3 131 3 132 3 133 2 134 3 135 3 136 3 137 3 138 3 139 3 140 3 141 3 142 3 143 3 144 3 145 3 146 3 147 3 148 3 149 3 ClassTable: 0 1 2 0 50 0 0 1 0 48 2 2 0 1 49 Covariance Matrix 0 : 0 1 2 0 0.265008163265306 0.0927210884353742 0.167514285714286 1 0.0927210884353742 0.115387755102041 0.055243537414966 2 0.167514285714286 0.055243537414966 0.185187755102041 3 0.0384013605442177 0.0327102040816327 0.042665306122449 3 0 0.0384013605442177 1 0.0327102040816327 2 0.042665306122449 3 0.0418816326530612 Prior : 0 0 0.333333333333333 1 0.333333333333333 2 0.333333333333333 PROB: 0 1 2 0 1 3.89635792768677E-22 2.61116827494833E-42 1 1 7.21796991863879E-18 5.04214334588401E-37 2 1 1.46384894952907E-19 4.67593159333071E-39 3 1 1.26853637674403E-16 3.56661049202016E-35 4 1 1.63738744612726E-22 1.08260526717561E-42 5 1 3.88328166174543E-21 4.56654013405467E-40 6 1 1.1134694458599E-18 2.3026084834884E-37 7 1 3.87758637727045E-20 1.07449600387617E-39 8 0.999999999999998 1.90281305967755E-15 9.48293561788352E-34 9 1 1.11180260918759E-18 2.72405964325484E-38 10 1 1.18527748898975E-23 3.23708368191298E-44 11 1 1.62164851137697E-18 1.83320074038366E-37 12 1 1.45922504711622E-18 3.2625064352377E-38 13 1 1.11721885779029E-19 1.31664193135497E-39 14 1 5.4873987251784E-30 1.53126472959902E-52 15 1 1.26150509583788E-27 2.26870462780447E-48 16 1 6.75433806261566E-25 3.86827125184469E-45 17 1 4.22374070046694E-21 1.22431307255763E-40 18 1 1.77491130351548E-22 2.5521532433363E-42 19 1 2.59323737921836E-22 5.79207874344749E-42 20 1 1.27463865682517E-19 4.35777421418678E-39 21 1 1.4659990076799E-20 1.98724138647432E-39 22 1 6.56928044945199E-25 7.76917736630943E-46 23 0.999999999999991 8.91234785423208E-15 9.1786241650176E-32 24 0.999999999999999 1.07070246199648E-15 1.16751587102608E-33 25 1 2.49733903598925E-16 5.71026880713927E-35 26 1 3.96773183597681E-17 4.37862393400249E-35 27 1 1.54816504878351E-21 1.59535976667668E-41 28 1 9.27184652389738E-22 6.29795546615504E-42 29 1 9.66514422364528E-17 2.97797411204608E-35 30 1 2.29993587694263E-16 7.18266552062749E-35 31 1 1.97540361007101E-19 2.78833402097428E-38 32 1 7.10004097342709E-27 2.21640831858024E-48 33 1 1.61029483654946E-28 2.74378339740563E-50 34 1 1.20521934033381E-17 1.2772450797832E-36 35 1 1.59718567904273E-21 9.03377178189315E-42 36 1 1.93986888092869E-24 1.66280764122895E-45 37 1 3.31023376400147E-23 7.00497072116312E-44 38 1 4.19024193534821E-17 6.99144060854016E-36 39 1 1.76935863474539E-20 3.54169362585279E-40 40 1 1.06301363512176E-21 2.00386616263149E-41 41 0.999999999978258 2.17421702175081E-11 1.21378079456305E-28 42 1 1.54075327236441E-18 1.30571860833262E-37 43 0.999999999999999 8.94058875293973E-16 1.3155106225373E-32 44 1 1.61620622204115E-17 3.2059920592081E-35 45 1 1.71474317216017E-16 7.17243513417258E-35 46 1 2.0830893288107E-22 2.28978349710803E-42 47 1 2.7934821528124E-18 2.62953861900424E-37 48 1 2.59756035567857E-23 9.82081977684015E-44 49 1 2.32225794022775E-20 4.24175670110456E-40 50 1.96973175506613E-18 0.999889412240982 0.000110587759018098 51 1.24287799621613E-19 0.999257470339862 0.000742529660138549 52 2.0882630542231E-22 0.995806947154067 0.00419305284593237 53 2.19889843940163E-22 0.999642349804226 0.000357650195773665 54 4.21367813304238E-23 0.995590345144127 0.00440965485587324 55 8.12728653249083E-23 0.99850201836847 0.00149798163153038 56 3.54989967813166E-22 0.98583457962357 0.0141654203764301 57 5.00706455445538E-14 0.999999888018824 1.11981125915622E-07 58 5.68333389389098E-20 0.999878135052759 0.000121864947241113 59 1.24103857349892E-20 0.999502691481115 0.000497308518885132 60 1.95662763937994E-18 0.99999857915944 1.42084056032926E-06 61 5.96890036424978E-20 0.999229428361292 0.000770571638708534 62 2.71612817142458E-18 0.999998779830561 1.22016943887906E-06 63 1.18444452318768E-23 0.994326714395047 0.00567328560495259 64 5.57493127051318E-14 0.999998350784465 1.64921547935997E-06 65 2.36951149493997E-17 0.999957317877693 4.26821223073998E-05 66 8.42932810347787E-24 0.980647108438011 0.0193528915619887 67 2.50507161487087E-16 0.999999084828366 9.15171633415319E-07 68 1.67035240315192E-27 0.959573472466896 0.0404265275331035 69 1.34150265115522E-17 0.999996703894565 3.29610543460692E-06 70 7.40811758162493E-28 0.253228224738174 0.746771775261826 71 9.39929180687634E-17 0.999990654708731 9.34529126858083E-06 72 7.67467217173111E-29 0.815532827469118 0.184467172530882 73 2.68301817862459E-22 0.999572253144266 0.000427746855734505 74 7.81387455762235E-18 0.999975785420659 2.42145793413337E-05 75 2.07320734549583E-18 0.999917094703006 8.29052969937477E-05 76 6.35753788317195E-23 0.998254064057654 0.00174593594234629 77 5.63947317748202E-27 0.6892131192651 0.3107868807349 78 3.77352772315036E-23 0.992516862421269 0.00748313757873124 79 9.55533837753134E-12 0.999999980884202 1.91062427723588E-08 80 1.02210867392728E-17 0.999996992252333 3.0077476672767E-06 81 9.64807489487809E-16 0.999999673329606 3.26670393036477E-07 82 1.6164048498996E-16 0.9999962215592 3.778440799605E-06 83 4.24195194474068E-32 0.143391908078749 0.856608091921251 84 1.72451373302881E-24 0.963557581487526 0.0364424185124737 85 1.34474562081143E-20 0.994040068728999 0.00595993127100056 86 3.30486831694226E-21 0.998222327554005 0.00177767244599476 87 2.03457104837351E-23 0.99945569039693 0.000544309603069924 88 5.80698628888408E-18 0.999948628991219 5.13710087811031E-05 89 5.98119018015315E-21 0.999818313010677 0.000181686989322851 90 5.87861351190954E-23 0.999385580036369 0.000614419963631344 91 5.39900622927546E-22 0.99809340863166 0.00190659136833998 92 3.55950706996344E-18 0.999988714300912 1.12856990882795E-05 93 2.10414566195034E-14 0.999999886498331 1.13501647389283E-07 94 4.70087713218134E-21 0.999697977427644 0.000302022572355453 95 1.58432826245531E-17 0.999981736726967 1.8263273032574E-05 96 2.80229312743823E-19 0.999889168510548 0.000110831489452329 97 1.62691766654364E-18 0.999953595115214 4.64048847857305E-05 98 7.63837759915641E-11 0.9999999812503 1.86733161738005E-08 99 4.67930110528286E-19 0.999926941365602 7.30586343982778E-05 100 7.50307535787394E-52 7.12730304524431E-09 0.999999992872697 101 5.21380197778188E-38 0.00107825098684016 0.99892174901316 102 1.23126361178618E-42 2.5928263674499E-05 0.999974071736326 103 1.5374987093819E-38 0.00106813895788396 0.998931861042116 104 6.24250059805309E-46 1.81296336402271E-06 0.999998187036636 105 4.20928142264626E-49 6.65626292581717E-07 0.999999334373707 106 3.79783718920213E-33 0.0486202537563576 0.951379746243642 107 1.35217625957575E-42 0.000139546311732453 0.999860453688268 108 1.32338962875972E-42 0.000223531291267257 0.999776468708733 109 3.45335796991583E-46 1.72727719755284E-07 0.99999982727228 110 5.45266025357921E-32 0.0130535277071713 0.986946472292829 111 1.18256006692676E-37 0.00167387461672592 0.998326125383274 112 5.20432100382649E-39 0.000200635233279198 0.999799364766721 113 1.26995255164363E-40 0.000194867232288328 0.999805132767712 114 1.6853613804622E-45 1.00045460233037E-06 0.999998999545398 115 5.1416398277959E-40 2.60549340476461E-05 0.999973945065952 116 1.90982041288985E-35 0.00608355276834907 0.993916447231651 117 1.20779857988563E-44 1.50379915614154E-06 0.999998496200844 118 3.18126528330457E-59 1.31727867517054E-09 0.999999998682721 119 1.59851089004605E-33 0.220798984305311 0.779201015694688 120 1.11946077288319E-42 6.45186467453254E-06 0.999993548135325 121 3.03817020493178E-37 0.000827267586982933 0.999172732413017 122 6.03287894248635E-50 9.50983817394636E-07 0.999999049016183 123 1.9512605095192E-31 0.0971194197474795 0.90288058025252 124 1.95640815619155E-39 8.83684525244587E-05 0.999911631547476 125 1.10933653717363E-36 0.002679309662425 0.997320690337575 126 7.84199684983311E-30 0.188367543357746 0.811632456642254 127 7.96469039198895E-30 0.134243091251227 0.865756908748773 128 6.19064114103918E-44 1.30368066299741E-05 0.99998696319337 129 1.40644845645161E-32 0.103682284629142 0.896317715370858 130 4.10812925130498E-42 0.000144233750964738 0.999855766249035 131 1.55569699085988E-36 0.000519804735082123 0.999480195264918 132 1.32032958960942E-45 3.01409095623433E-06 0.999996985909044 133 1.28389062432083E-28 0.729388128031784 0.270611871968216 134 1.92656005411401E-35 0.0660225289487927 0.933977471051207 135 1.27108275807441E-45 2.15281844850908E-06 0.999997847181551 136 3.03896326390101E-44 8.88185881285476E-07 0.999999111814119 137 4.60597294289873E-35 0.00616564821325895 0.993834351786741 138 4.53863396078092E-29 0.192526178705555 0.807473821294445 139 2.14023245437832E-36 0.000829089537724701 0.999170910462275 140 6.57090159803634E-45 1.18080976021024E-06 0.99999881919024 141 6.20258777948126E-36 0.000427639823558763 0.999572360176441 142 5.21380197778188E-38 0.00107825098684016 0.99892174901316 143 1.07394549657031E-45 1.02851888652808E-06 0.999998971481114 144 4.04824911953177E-46 2.52498398896306E-07 0.999999747501601 145 4.97006952429139E-39 7.47336051808618E-05 0.999925266394819 146 4.61661069188626E-36 0.00589878415239281 0.994101215847607 147 5.54896239081565E-35 0.00314587355706823 0.996854126442932 148 1.61368724215064E-40 1.25746799233817E-05 0.999987425320077 149 2.85801160733409E-33 0.017542290775785 0.982457709224215 MAHALANOBIS: 0 1 2 0 0 89.8641855820738 179.384712514278 1 89.8641855820738 0 17.201066428396 2 179.384712514278 17.201066428396 0 nrmiss = 0Link to C# source.