/** * Get the training data. * * @return */ public TrainRelation<E> getTrainingData(E clazz) { TrainRelation<E> subRelation = new TrainRelation<E>("sub-relation", (Metadata) train.getMetadata().clone()); for (LabeledFeatureVector<E> lfv : train) { if (lfv.getLabel().equals(clazz)) { subRelation.add(lfv); } } return subRelation; }