use of org.jpmml.converter.HasDerivedName in project jpmml-r by jpmml.
the class Formula method getCoefficient.
public Double getCoefficient(Feature feature, RDoubleVector coefficients) {
FieldName name = feature.getName();
if (feature instanceof HasDerivedName) {
BiMap<Feature, FieldName> inverseFeatures = this.features.inverse();
name = inverseFeatures.get(feature);
}
return coefficients.getValue(name.getValue());
}
Aggregations