Detection and Classification of Sleep Apnea and Hypopnea Using PPG and SpO$_2$ Signals