Defining Safe Training Datasets for Machine Learning Models Using Ontologies