Gondee / pMIR

Portable pMIR Android application for TI portable sensors
3 stars 0 forks source link

Integration #15

Closed IannothSlurgh closed 8 years ago

IannothSlurgh commented 8 years ago

A link to my code below:

https://drive.google.com/a/tamu.edu/folderview?id=0B_2fUAHLcAnGT2JyQkVpbmRzMFE&usp=sharing

So what do we need to accomplish to meet our quota?

The Problem: Use PCA to distinguish between some materials, visualize a 2D PCA plot on the android as well as saying which material the scanned material is most like.

The code can currently do the following: -make a model, but not save it in the filesystem -The training produces a number of axes which you use in a graph (currently I allow many more axes than two because I figured we wouldn't visualize the model). The axes are stored in the chemoAlgo public object (presumably matrix U) -The training also produces a point for each thing you scanned for training data. It is stored in chemoPCACompressed. -When using infer, the model is used to produce a point representing the new thing you scanned. The euclidean distance formula is used from the new point to all points from the training set. The closest point is what the model supposes that the new data qualifies as.

IannothSlurgh commented 8 years ago

Chemometric Needs: -Make the number of latent vectors static (2 so that we get 2 axes for a 2D graph) -Save the model in the file system (pca offers the export function to produce an object which we can put in a JSON file or the like) -Load the model from the file system -Store/Load scan files

SIde note: what is in a training scan file -the absorbances -the concentrations (must know for data to have value) -Perhaps a qualitative name (useful for PCA, but not essential) -tags indicating the name of each material in the sample Example: "Bad Substance",[0.5, 0.5], [Evil A, Evil B], [3.3, 5.4, 9.1............]

IannothSlurgh commented 8 years ago

GUI needs: -Android Chart to display a graph like in the second picture: https://github.com/mljs/pca/issues/5 For this demonstration, we at most we will need to use three unique colored points: A- for training data that is not close to the new sample. B- for the training data point closest to the new sample. C- for the new sample. -User opens app and is queried for load or new model. -If load, do file system stuff to look up model. -If new, ask to do scans using standard procedures. -After scan, ask for file name, concentrations, and concentration names -User can hit next sample, and done (save) which asks for a file name. -We assume PCA since that is what we present next time. -Query new scan, after scanning display the android chart with words above it stating what it thinks it is.

IannothSlurgh commented 8 years ago

Ways to potentially cut on work for Wednesday:

-Assume qualitative analysis (removing one query) -Hard code database avoiding need for database to be complete. -Reduced error handling. Just be careful what you input so nothing breaks. -Assumed load- no query between producing new model and loading old model. -Specific load- no query which files to load, let them be at static, predefined addresses.

What is most important is that we show functionality. As annoying as it is, a ton of progress that doesn't produce visual results is dead weight in demos.

IannothSlurgh commented 8 years ago

Communication needs: -It does what it needs to do.

IannothSlurgh commented 8 years ago

Conclusion: -Most of the work is in the GUI, but we can save in effort by slashing queries here and there. -The goal is to display that the chemometrics engine can work together with a GUI and utilize the already developed scan interface together with the Bluetooth communication.

Questions? Comments? Sadness about how much we'll have to get done to be presentable? (or that another meeting got sprung on us?)