Machine learning assisted early anomaly detection of LEDs with spectral power distribution modeling