Methodology to develop machine learning algorithms to improve performance in gastrointestinal endoscopy