Compressed Sensing Spectroscopy and Dynamic-Rate Neural Network Classification