Optimizing a logistic regression algorithm to control Hue lights. Optimized using Matlab and ported to C++.