Package org.tribuo.data.columnar
Interface ResponseProcessor<T extends Output<T>>
- All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
- All Known Implementing Classes:
BinaryResponseProcessor
,EmptyResponseProcessor
,FieldResponseProcessor
,QuartileResponseProcessor
public interface ResponseProcessor<T extends Output<T>>
extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
An interface that will take the response field and produce an
Output
.-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets the field names this ResponseProcessor uses.Gets the OutputFactory this ResponseProcessor uses.Deprecated.useprocess(List)
and support multiple values instead.Returns Optional.empty() if it failed to process out a response.This method has a default implementation for backwards compatibility with Tribuo 4.0 and 4.1.void
setFieldName
(String fieldName) Deprecated.Response processors should be immutable; downstream objects assume that they are Set the field name this ResponseProcessor uses.Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
getOutputFactory
OutputFactory<T> getOutputFactory()Gets the OutputFactory this ResponseProcessor uses.- Returns:
- The output factory.
-
getFieldName
Deprecated.usegetFieldNames()
and support multiple values instead. Gets the field name this ResponseProcessor uses.- Returns:
- The field name.
-
setFieldName
Deprecated.Response processors should be immutable; downstream objects assume that they are Set the field name this ResponseProcessor uses.- Parameters:
fieldName
- The field name.
-
process
Deprecated.useprocess(List)
and support multiple values instead. Returns Optional.empty() if it failed to process out a response.- Parameters:
value
- The value to process.- Returns:
- The response value if found.
-
process
Returns Optional.empty() if it failed to process out a response.This method has a default implementation for backwards compatibility with Tribuo 4.0 and 4.1. This method should be overridden by code which depends on newer versions of Tribuo. The default implementation will be removed when the deprecated members are removed. Unless is is overridden it will throw anIllegalArgumentException
when called with multiple values.- Parameters:
values
- The value to process.- Returns:
- The response values if found.
-
getFieldNames
Gets the field names this ResponseProcessor uses.- Returns:
- The field names.
-
getFieldNames()
and support multiple values instead.