Package org.tribuo.interop.onnx
Class RegressorTransformer
java.lang.Object
org.tribuo.interop.onnx.RegressorTransformer
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
,Serializable
,OutputTransformer<Regressor>
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Does this OutputTransformer generate probabilities.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
toString()
transformToBatchOutput
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo) Converts aOnnxValue
containing multiple outputs into a list ofOutput
s.transformToBatchPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int[] numValidFeatures, List<Example<Regressor>> examples) Converts aOnnxValue
containing multiple outputs into a list ofPrediction
s.transformToOutput
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo) Converts aOnnxValue
into the specified output type.transformToPrediction
(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int numValidFeatures, Example<Regressor> example) Converts aOnnxValue
into aPrediction
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
-
Constructor Details
-
RegressorTransformer
public RegressorTransformer()Constructs a RegressorTransformer.
-
-
Method Details
-
transformToPrediction
public Prediction<Regressor> transformToPrediction(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int numValidFeatures, Example<Regressor> example) Description copied from interface:OutputTransformer
Converts aOnnxValue
into aPrediction
.- Specified by:
transformToPrediction
in interfaceOutputTransformer<Regressor>
- Parameters:
tensor
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.numValidFeatures
- The number of valid features used by the prediction.example
- The example to insert into the prediction.- Returns:
- A prediction object.
-
transformToOutput
public Regressor transformToOutput(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo) Description copied from interface:OutputTransformer
Converts aOnnxValue
into the specified output type.- Specified by:
transformToOutput
in interfaceOutputTransformer<Regressor>
- Parameters:
tensor
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.- Returns:
- A output.
-
transformToBatchPrediction
public List<Prediction<Regressor>> transformToBatchPrediction(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int[] numValidFeatures, List<Example<Regressor>> examples) Description copied from interface:OutputTransformer
Converts aOnnxValue
containing multiple outputs into a list ofPrediction
s.- Specified by:
transformToBatchPrediction
in interfaceOutputTransformer<Regressor>
- Parameters:
tensor
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.numValidFeatures
- The number of valid features used by the prediction.examples
- The example to insert into the prediction.- Returns:
- A list of predictions.
-
transformToBatchOutput
public List<Regressor> transformToBatchOutput(List<ai.onnxruntime.OnnxValue> tensor, ImmutableOutputInfo<Regressor> outputIDInfo) Description copied from interface:OutputTransformer
Converts aOnnxValue
containing multiple outputs into a list ofOutput
s.- Specified by:
transformToBatchOutput
in interfaceOutputTransformer<Regressor>
- Parameters:
tensor
- The value to convert.outputIDInfo
- The output info to use to identify the outputs.- Returns:
- A list of outputs.
-
generatesProbabilities
public boolean generatesProbabilities()Description copied from interface:OutputTransformer
Does this OutputTransformer generate probabilities.- Specified by:
generatesProbabilities
in interfaceOutputTransformer<Regressor>
- Returns:
- True if it produces a probability distribution in the
Prediction
.
-
toString
-
getProvenance
public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()- Specified by:
getProvenance
in interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-