Cross-validation for the selection of spectral variables using the successive projections algorithm