torekp Posted December 16, 2008 Report Share Posted December 16, 2008 Does anyone know how to do Multiple Discrimant Analysis (here is a website explaining it a bit) in Labview? It is supposed to be similar to Principal Components Analysis, which I am already doing. I attach my PCA programs (8.5, Full). That much was easy. Maybe someone who speaks "math" better than I do could tell me whether the website I mentioned contains all the recipe I need? Labview Full has a built-in covariance function, for what that's worth. Quote Link to comment
Anders Björk Posted December 17, 2008 Report Share Posted December 17, 2008 On this page there seems to be some matlabcode to do MDA http://www.cs.tut.fi/sgn/arg/SGN-2556/ Here you have a more easy read discription I think, from looking at it fast http://gupea.ub.gu.se/dspace/bitstream/207...l_Gusev_IFE.pdf I would do Partial Least Squares Discriminant analysis, however that requires code to PLS. Quote Link to comment
torekp Posted December 17, 2008 Author Report Share Posted December 17, 2008 Awesome, Anders, thank you very much! I think I can translate from Matlab :thumbup: Quote Link to comment
Anders Björk Posted December 17, 2008 Report Share Posted December 17, 2008 QUOTE (torekp @ Dec 16 2008, 05:58 PM) Awesome, Anders, thank you very much! I think I can translate from Matlab :thumbup: Great! I would like to test it, if you get it working. Quote Link to comment
torekp Posted January 7, 2009 Author Report Share Posted January 7, 2009 QUOTE (Anders Björk @ Dec 16 2008, 07:28 PM) Great! I would like to test it, if you get it working. Here you go. Based on the Matlab program by Evgeny Krestyannikov that you pointed out to me. The top-level example program is in the folder called tests. Read the documentation for that VI and for its main subVI, and the websites mentioned therein, for hints at how it's supposed to work. Especially, note that data must be sorted by group#. It's not polished at all. It does seem to work, but I'm a bit over my head here. If a little knowledge is a dangerous thing, then I belong on the FBI's ten most wanted list. I think I'll turn to Partial Least Squares instead, as you suggested. Quote Link to comment
torekp Posted January 14, 2009 Author Report Share Posted January 14, 2009 In case anyone is interested, I translated from Matlab a program to do Partial Least Squares. Here it is. It gives the same result on a test as the original Matlab program, but if that original program were flawed I'd never know it. A little knowledge, dangerous thing, yada yada. Note: the file-reading part assumes that each class is grouped. All the class 1's come before all the class 0's, or vice versa; and so on for other classes. Quote Link to comment
torekp Posted January 15, 2009 Author Report Share Posted January 15, 2009 Found an error in the termination condition for the creation of the PLS model (should stop if i+1 >= N, not if i >= N). Here's the fix. Quote Link to comment
Anders Björk Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (torekp @ Jan 14 2009, 01:38 PM) Found an error in the termination condition for the creation of the PLS model (should stop if i+1 >= N, not if i >= N). Here's the fix. I would never set the stop critera as a tolerance, you easily overfit the model. Instead test by crossvalidation or test set the reasonable numbers of PLS-components. Another criterar for max PLS-comp is how many driving forces generate you data or affect the class divisions. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.