Text this: Automated fitting process using robust reliable weighted average on near infrared spectral data analysis