Look at this code and let me know what you think. I modified the 2x2LDA, 2 class code to do 4x4LDA, 7 class code. I haven't tested it yet, so if you have data I can use that for testing. If not, I'll try to make something up.
Total: 4 hours
Total 2 hoursCreated 2 programs, one to do the LDA pre-work (to determine the pooled covariance matrix) and one to do the testing on the new sample. Take a look and let me know what you think. This works on the 2x2 matrix. Some of the code needs to change if there are more/less # of samples.
Created functions to transition from input data to pooled covariance matrix.
Pass back results to main program.
Remove hard-coded values to number of samples in each group.
Create new function to evaluate test values
Program currently only takes in 2 groups, would need to extend to more groupings.
Created code from spreadsheet named middleLDAtestc.xlt
File attached here.
Started looking at C code again
2011_11_13 - Completed Inverse work, total hours: 6
Code to be uploaded today.
Looked at code again. Ran LDA program with 20 input points, and didn't get good results (before I just extended it to 20 data points and check for compiler errors).
Issue with input data I'm assuming; my input data was duplication of the example LDA data, to reach 20 data points. This duplication caused the program to crash (could not take the inverse of the covariance matrix). Perturbed some data from its original values, then was able to get a probability function result from it. Did not pursue the code further once I realized it was a data problem & not a software issue.
Modified code to use 20 input points for each movement. Need to now include movements in 9 different directions (states).
Found looping error, now LDA discriminant function calculates correctly. Getting results as expected, using one of the calibration points as the sample point. Will now look at using "real" data, not sample data from tutorial
Time domain statistics funtions acsept arrays and vareables consolodated.
So arrays can be passed into the time domain statistics functions
They all use a single for loop so that loop could be when the data is taken in.
Taking the mean is done at the end of the for loop.
Vareables are replaced with constants or macros where possible.
Have globalmean, means of groups, & covariance matrices calculating.
Need to complete:
1-10 of 63