Selection of relevant features and examples in machine learning