  Despite its ability to draw precise inferences from large and complex
datasets, the use of data analytics in the field of condensed matter and
materials sciences -- where vast quantities of complex metrology data are
regularly generated -- has remained surprisingly limited. Specifically, such
approaches could dramatically reduce the engineering complexities of devices
that directly exploit the physical properties of materials. Here, we present a
cyber-physical system for accurately estimating the wavelength of any
monochromatic light in the range of 325-1100nm, by applying Bayesian inference
on the optical transmittance data from a few low-cost, easy-to-fabricate thin
film "filters" of layered transition metal dichalcogenides (TMDs) such as MoS2
and WS2. Wavelengths of tested monochromatic light could be estimated with only
1% estimation error over 99% of the stated spectral range, with lowest error
values reaching as low as a few ten parts per million (ppm) in a system with
only eleven filters. By step-wise elimination of filters with the least
contribution toward accuracy, mean estimation accuracy of 99% could be obtained
even in a two-filter system. Furthermore, we provide a statistical approach for
selecting the best "filter" material for any intended spectral range based on
the spectral variation of transmittance within the desired range of
wavelengths. And finally, we demonstrate that calibrating the data-driven
models for the filters from time to time overcomes the minor drifts in their
transmittance values, which allows using the same filters indefinitely. This
work not only enables the development of simple cyber-physical photodetectors
with high accuracy color-estimation, but also provides a framework for
developing similar cyber-physical systems with drastically reduced complexity.
