/** * Returns the value of the discrete prediction that this learner would make, given an example. * * @param example The example object. * @return The discrete value. **/ public String discreteValue(Object example) { return computePrediction(example); }
/** * Returns the value of the discrete prediction that this learner would make, given an example. * * @param example The example object. * @return The discrete value. **/ public String discreteValue(Object example) { return computePrediction(example); }
/** * Returns the classification of the given example object as a single feature instead of a * {@link FeatureVector}. * * @param example The object to classify. * @return The classification of <code>example</code> as a feature. **/ public Feature featureValue(Object example) { return new DiscretePrimitiveStringFeature(containingPackage, name, "", computePrediction(example)); }
/** * Returns the classification of the given example object as a single feature instead of a * {@link FeatureVector}. * * @param example The object to classify. * @return The classification of <code>example</code> as a feature. **/ public Feature featureValue(Object example) { return new DiscretePrimitiveStringFeature(containingPackage, name, "", computePrediction(example)); }