Development of an inferential sensor for batch-end quality prediction