%users 1, 2 and 3, you pam and Jake, each have at least 5 sessions (you may have 6)
%Mike Sessions: 1, 2, 7, 9, 12. Prediction: 7. Calibration: 1,2,9,12 
%Pam Sessions: (3), 6, 10, 14, 17, 20. Prediciton: 14. Calibration: 6, 10, 17, 20
%Jake Sessions: 4,13,15,18, 21. Prediction: 15. Calibration: 4,13,18,21
%Univ Sessions: Prediciton 7, 14, 15. Calibration: 1,2,4,6,9,10,12,13,14,17,18,21
%using the 25hz 64pixel normalized PDS, i suggest the following for selecting outliers for removal from presentation to show expected performance with higher SNR.
%spe_d1r0c0s0122bPD.mat (x1pdnn) and sgl_y.mat (onetouch/verio)

%1. for a given user, select 1 session to be the validation set. use the rest of the users data as the calibration set. produce a calibration, maybe gpr rq, linear least squares, or any other(s) that are interesting for pds.  a standard regression learner 5fold approach is fine.
%2. generate calibration self-prediction for all calibration data, ie selfpred=TM.predictfcn(cal). identify any predictions with abs error>20%. exclude these from cal set and recompute calibration(s).
%3. recheck for outliers as in step 2.
%4. make note of all outliers that were excluded from calibration.
%5. compute validation predictions with the cal(s) from 2 (or 3 if additional OL were found, excluded and cal recomputed).
%6. check validation predictions for an  abs error >20% and make note of these.
%7. execute 1-6 using the next session as val and the rest as cal.
%8. repeat 7 until all sessions have been the validation set.
%9.  identify any spectra for which it was identified as an OL in step 2(or3) AND in step 6. this assumes step 8 has been completed.
%10. Clarke and time plots can be generated for each session when it was the validation set using predictions from 6. this is the real validation performance.  the same plots can be generated with OL identified in 9. omitted. this is the expected performance with higher SNR. in both sets of plots, avg by sitting is valid and may help overall.

