E - The type of objects whose features are extracted.public class BoundedFeatureExtractor<E> extends ModifiedFeatureExtractor<E> implements Serializable
BoundedFeatureExtractor provides a lower-bound and
upper-bound on feature values between which all values from a
contained base extractor are bounded. Values greater than the
upper bound are replaced with the upper bound, and values less than
the lower bound are replaced with the lower bound. Values may be
unbounded below by using Double.NEGATIVE_INFINITY as the
lower bound, and may be unbounded above by using Double.POSITIVE_INFINITY the upper bound.| Constructor and Description |
|---|
BoundedFeatureExtractor(FeatureExtractor<? super E> extractor,
double minValue,
double maxValue)
Construct a bounded feature extractor that bounds the feature
values produced by the specified extractor to be within the
specified minimum and maximum values.
|
| Modifier and Type | Method and Description |
|---|---|
Number |
filter(String feature,
Number value)
Return the bounded value corresponding to the specified value.
|
featuresbaseExtractorpublic BoundedFeatureExtractor(FeatureExtractor<? super E> extractor, double minValue, double maxValue)
extractor - Base feature extractor.minValue - Minimum value of a featuremaxValue - Maximum value of a featureIllegalArgumentException - If minVal > maxValpublic Number filter(String feature, Number value)
filter in class ModifiedFeatureExtractor<E>feature - Name of feature, which is ignored.value - Value to filter.Copyright © 2019 Alias-i, Inc.. All rights reserved.