kootenpv / brightml

Convenient Machine-Learned Auto Brightness (Linux)
MIT License
120 stars 4 forks source link

RFC: Pre-transform ALS data #12

Open xorgy opened 6 years ago

xorgy commented 6 years ago

Lux, and by extension, illuminance sensor data from IIO, is exponential relative to perceived illuminance. There is also a point at which the ALS is seeing so little light that it can not inform brightness decisions. I think factors like this may have an impact on BrightML's ability to learn brightness preferences relative to raw illuminance. I've noticed that in low light conditions (roughly 2-15 lux), BrightML generates erratic brightness values (either extremely bright [near 34%], or extremely dark [the smallest valid brightness value]) when the ALS is recognized, and I know it's not because the ALS readings are erratic, because they are not. In normal or bright conditions, BrightML reacts as expected to ALS data.

Locally I have added a small static offset (20lx) and it seems to have improved results, not sure if anything else should be done, or if there's a better way to accomplish this.

kootenpv commented 4 years ago

I have completely missed this, amazing research! Maybe it means we should take the log of the value then to offset the exponential scale?

xorgy commented 4 years ago

Hmm, I'm not fully sure at this point, I don't really have a laptop right now. I'll probably be getting ahold of one as soon as we all have reason and freedom to sit down in public again, and I'll look into this then.

kootenpv commented 4 years ago

I forgot - since it is a RandomForest, taking the log does not change the outcome.

xorgy commented 4 years ago

It may still be a good preprocessing step to help make sense of things at the input layer; though I'm an absolute amateur at machine learning and all I know is that there are some big matrices and vectors sitting there.