Package org.tribuo.interop.oci
Interface OCIOutputConverter<T extends Output<T>>
- Type Parameters:
T
- The output type.
- All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,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, 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.-
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.boolean
Does this OCIOutputConverter generate probabilities?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
-
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
.
-