Imagine wearing a wristband that, besides telling time, reads the light around you. Thanks to tiny built‑in spectrometers, these devices capture the light spectrum – the "fingerprint" of colors and wavelengths – like a miniature rainbow. A research team built an analysis pipeline to turn those data into useful information: first they pick the most relevant spectral region, then convert it to a base‑10 logarithm and normalize it, avoiding confusion between sheer brightness and light quality. Next, they group hourly values using the medoid, a representative point, and add a mathematical trick: encoding the hour with sine and cosine so the model knows whether it’s day or night. The outcome is a multilayer perceptron (MLP) classifier that, tested on 26 participants for over a week, identifies natural light with 88% accuracy and an AUC of 0.938. Distinguishing indoor from outdoor light is harder, because spectra overlap and the data are unbalanced, yielding an AUC around 0.75. This shows that simple illuminance thresholds aren’t enough; a more sophisticated spectral‑temporal analysis is needed. The code has been released on GitHub and Zenodo, allowing other scientists to test, improve, and benchmark new methods. In the future, such wristbands could help track how much time we spend in sunlight, with implications for health, circadian rhythms, and the environment.
The proposed pipeline starts with a spectral domain selection, typically limited to 400‑700 nm, where most biologically relevant variations occur. The base‑10 logarithmic transformation reduces dynamic variance, making model learning more stable. L2 normalization, calculated excluding total intensity, prevents the classifier from relying solely on illuminance values, focusing instead on spectral shape. Hourly medoid aggregation reduces temporal noise by selecting the most central sample within the hourly distribution, rather than a mean that could be skewed by outliers. Sinusoidal hour encoding (sin θ, cos θ) preserves the 24‑hour periodicity, allowing the MLP to learn recurring patterns linked to day/night context. The MLP, with two or three hidden layers and ReLU activations, is trained with cross‑entropy loss and optimized via Adam. Subject‑wise cross‑validation ensures the model generalizes to new individuals, avoiding overfitting to specific movement or habit patterns. Results show an AUC of 0.938 for natural‑artificial classification, indicating near‑perfect ROC curve separation. However, indoor‑outdoor classification remains limited due to strong spectral overlap (e.g., LED lamps with color temperatures similar to overcast sky) and class imbalance (fewer outdoor samples). To improve, integrating GPS or accelerometer sensors for additional context and employing oversampling techniques (SMOTE) to balance classes are recommended. Moreover, deeper architectures like 1‑D convolutional networks applied to the spectral vector could capture finer local patterns, potentially raising indoor‑outdoor AUC above 0.80. Publishing the code on GitHub (MIT license) and datasets on Zenodo (CC‑BY) enables reproducibility and pipeline extension by the scientific community, fostering open standards for wearable light measurement.
