/** * Train the annotator with the given grouped dataset. Internally, the * dataset is converted to a list containing exactly one reference to each * object in the dataset with (potentially) multiple annotations. * * @param dataset * the dataset to train on */ public void train(GroupedDataset<ANNOTATION, ? extends ListDataset<OBJECT>, OBJECT> dataset) { train(AnnotatedObject.createList(dataset)); } }
@Override public void train(GroupedDataset<ANNOTATION, ? extends ListDataset<OBJECT>, OBJECT> dataset) { train(AnnotatedObject.createList(dataset)); } }
/** * Train the annotator with the given grouped dataset. This method assumes * that each object can appear in multiple groups of the dataset (i.e. a * multi-label problem). Internally, the dataset is converted to a list * containing exactly one reference to each object in the dataset with * (potentially) multiple annotations. * <p> * If the dataset is actually multi-class (i.e. each object belongs to only * a single group), then calling this method is equivalent to calling * {@link #trainMultiClass(GroupedDataset)}, but is less efficient as the * dataset has to be converted into a list. * <p> * Some annotator implementations do not care whether the data is * multi-class or multi-label, and might choose to override this method to * just call {@link #trainMultiClass(GroupedDataset)} instead. * * @param dataset * the dataset to train on */ public void train(GroupedDataset<ANNOTATION, ? extends ListDataset<OBJECT>, OBJECT> dataset) { for (final AnnotatedObject<OBJECT, ANNOTATION> ao : AnnotatedObject.createList(dataset)) { train(ao); } } }
new SamplesFeatureProvider() ); ann.train( AnnotatedObject.createList( vd.getTrainingDataset() ) );
SolverType.L2R_L2LOSS_SVC_DUAL, C, 0.1, 1 /* bias */, true); ann.train(AnnotatedObject.createList(trfeaturesz, trclasses));
SolverType.L2R_L2LOSS_SVC_DUAL, C, 0.1, 1 /* bias */, true); ann.train(AnnotatedObject.createList(trfeaturesz, trclasses));
new SamplesFeatureProvider() ); ann.train( AnnotatedObject.createList( vd.getTrainingDataset() ) );