@Override public IncrementalAnnotator<DoubleFV, String> getAnnotator() { if (this.k == null) this.k = new KNNAnnotator<DoubleFV, String, DoubleFV>( new IdentityFeatureExtractor<DoubleFV>(), DoubleFVComparison.EUCLIDEAN); return this.k; } },
@Override public IncrementalAnnotator<DoubleFV, String> getAnnotator() { if (this.k == null) this.k = new KNNAnnotator<DoubleFV, String, DoubleFV>( new IdentityFeatureExtractor<DoubleFV>(), DoubleFVComparison.EUCLIDEAN); return this.k; } },
@Override public IncrementalAnnotator<DoubleFV, String> getAnnotator() { if (this.n == null) this.n = new NaiveBayesAnnotator<DoubleFV, String>( new IdentityFeatureExtractor<DoubleFV>(), Mode.ALL); return this.n; } };
@Override public IncrementalAnnotator<DoubleFV, String> getAnnotator() { if (this.n == null) this.n = new NaiveBayesAnnotator<DoubleFV, String>( new IdentityFeatureExtractor<DoubleFV>(), Mode.ALL); return this.n; } };
/** * Convenience method to construct a {@link NaiveBayesAnnotator} in the case * where the raw objects are themselves the feature and thus an * {@link IdentityFeatureExtractor} can be used. This method is equivalent * to calling * <tt>new NaiveBayesAnnotator<OBJECT,ANNOTATION>(new IdentityFeatureExtractor<OBJECT>(), mode)</tt> * . * * @param mode * the mode of operation during prediction * @return the new {@link NaiveBayesAnnotator} */ public static <OBJECT extends FeatureVector, ANNOTATION> NaiveBayesAnnotator<OBJECT, ANNOTATION> create(Mode mode) { return new NaiveBayesAnnotator<OBJECT, ANNOTATION>(new IdentityFeatureExtractor<OBJECT>(), mode); }
new IdentityFeatureExtractor<DoubleFV>(), Mode.MULTICLASS, SolverType.L2R_L2LOSS_SVC, 0.01, 0.01, 1, true); ann.train(trainingData); hogClassifier.classifier = ann; new IdentityFeatureExtractor<DoubleFV>(), Mode.MULTICLASS, SolverType.L2R_L2LOSS_SVC, 0.01, 0.01, 1, true); ann.train(extendedTrainingData);
new IdentityFeatureExtractor<DoubleFV>(), Mode.MULTICLASS, SolverType.L2R_L2LOSS_SVC, 0.01, 0.01, 1, true); ann.train(trainingData); hogClassifier.classifier = ann; new IdentityFeatureExtractor<DoubleFV>(), Mode.MULTICLASS, SolverType.L2R_L2LOSS_SVC, 0.01, 0.01, 1, true); ann.train(extendedTrainingData);