sarafridov / FingertipVideo

Measure heart rate using fingertip color and contact surface area.
MIT License
0 stars 1 forks source link

question about the group lasso #1

Open feiwangoooh opened 5 years ago

feiwangoooh commented 5 years ago

so the final magnitude value are the green_B and area_B, which are the weight coefficients of the group lasso equation, I don't know if the understand is right.

sarafridov commented 5 years ago

green_B and area_B are indeed the weight coefficients from group LASSO, which includes a sine and a cosine at each frequency. The final magnitude values for group LASSO combine the sines and cosines to get one magnitude value at each frequency. The group LASSO heart rate prediction comes from taking the magnitudes, bandpass filtering (to the range of heart rate frequencies), thresholding (to reject noisy data), and then taking the frequency with the greatest magnitude.

I've updated the readme with a link to the paper, where the algorithm is described (alongside data comparing it to other approaches). Please take a look and feel free to ask if anything is unclear.

feiwangoooh commented 5 years ago

Thank you for your replay. Another question, the Minimize need the green_param and the area_param, how are the two values determined?

sarafridov commented 5 years ago

Minimize is call to cvxpy, which I use to solve the group LASSO problem. green_param and area_param are regularization constants used in group LASSO, that I hand-tuned. The goal of the regularization is to induce sparsity in the coefficients; I found these values to work reasonably well, but it's possible that other values could do a little better.