Hello Sam, thank you for your comment. The whole project was done using the built in Classify function, which proved to produce more accurate results than Predict.
After extracting the numerical data from the Spectrogram images using the UpToMeasurements function, the propertyVector function puts it all in an organized array for each of the motion types. These arrays of data are the input for each of the corresponding classes in the Classify function. I hope this answers your question; I didn't post the whole code because there are thousands of lines of data manipulation and extraction which would make this thread lengthy and boring (there was a lot of trial and error involved in this project as well), but I believe I have posted the important parts which produced the results. Anyway, the classify function was built by trying all many combinations of properties for the ComponentMeasurements fuction, so lets say I have a list of properties that I know have produced good results call that list "properties", and I also have a list of all the properties available to the function, call that "allProperties". The property exploration algorithm I used was somewhat as follows:
Do[propertyVector[Append[properties, allProperties[[i]]]];
Training;
Test;
Print[allProperties[[i]]];
classifier = Classify[trainingSet, PerformanceGoal -> "Quality"];
Print[ClassifierMeasurements[classifier, testSet, "Accuracy"]], {i,
1, Length[allProperties]}]
This way I could see which properties produced a higher accuracy in the classifiers performance. Note that "Training" and "Test" are written above. Once I got a good set of properties I would rebuild the classifier.
propertyVector[properties];
Training;
Test;
classifier = Classify[trainingSet, PerformanceGoal -> "Quality"];
- "trainingSet" is inside "Training" *
That is how I built the classifier, please be sure to reply to this comment if you have any other questions. I would be happy to send you my data, the Classify function or one of the test notebooks where I explored the properties and the accuracy they provided in the function.