Restricted Boltzmann Machine method for dimensionality reduction of large spectroscopic data