An efficient method for signal improvement in near-infrared spectroscopy measurements during calibration and validation processes