Interface OCIOutputConverter<T extends Output<T>>
- Type Parameters:
T- The output type.
- All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable,ProtoSerializable<org.tribuo.interop.oci.protos.OCIOutputConverterProto>,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>,Serializable
- All Known Implementing Classes:
OCILabelConverter,OCIMultiLabelConverter,OCIRegressorConverter
public interface OCIOutputConverter<T extends Output<T>>
extends com.oracle.labs.mlrg.olcut.config.Configurable, ProtoSerializable<org.tribuo.interop.oci.protos.OCIOutputConverterProto>, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, Serializable
Converter for a
DenseMatrix received from OCI Data Science Model Deployment.-
Field Summary
Fields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER -
Method Summary
Modifier and TypeMethodDescriptionList<Prediction<T>> convertOutput(DenseMatrix scores, int[] numValidFeatures, List<Example<T>> examples, ImmutableOutputInfo<T> outputIDInfo) Converts a dense matrix into a list of predictions of the appropriate type.convertOutput(DenseVector scores, int numValidFeature, Example<T> example, ImmutableOutputInfo<T> outputIDInfo) Converts a dense vector into a single prediction of the appropriate type.booleanDoes this OCIOutputConverter generate probabilities?The type witness used when deserializing the OCI model from a protobuf.Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfigMethods inherited from interface org.tribuo.protos.ProtoSerializable
serializeMethods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable
getProvenance
-
Method Details
-
convertOutput
Prediction<T> convertOutput(DenseVector scores, int numValidFeature, Example<T> example, ImmutableOutputInfo<T> outputIDInfo) Converts a dense vector into a single prediction of the appropriate type.- Parameters:
scores- The score vector.numValidFeature- The number of valid features (stored in the prediction).example- The example (stored in the prediction).outputIDInfo- The output information.- Returns:
- A prediction representing the value of this score vector.
-
convertOutput
List<Prediction<T>> convertOutput(DenseMatrix scores, int[] numValidFeatures, List<Example<T>> examples, ImmutableOutputInfo<T> outputIDInfo) Converts a dense matrix into a list of predictions of the appropriate type.- Parameters:
scores- The score matrix.numValidFeatures- The number of valid features in each example (stored in the prediction).examples- The examples (stored in the prediction).outputIDInfo- The output information.- Returns:
- A list of predictions representing the value of this score matrix.
-
generatesProbabilities
boolean generatesProbabilities()Does this OCIOutputConverter generate probabilities?- Returns:
- True if it produces a probability distribution in the
Prediction.
-
getTypeWitness
The type witness used when deserializing the OCI model from a protobuf.The default implementation throws
UnsupportedOperationExceptionfor compatibility with implementations which don't use protobuf serialization. This implementation will be removed in the next major version of Tribuo.- Returns:
- The output class this object produces.
-