public class RegressorTransformer extends Object implements OutputTransformer<Regressor>
Regressor
to a Tensor
containing a 32-bit float and a Tensor into a
Prediction
or Regressor.Constructor and Description |
---|
RegressorTransformer() |
Modifier and Type | Method and Description |
---|---|
boolean |
generatesProbabilities()
Does this OutputTransformer generate probabilities.
|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
String |
toString() |
org.tensorflow.Tensor<?> |
transform(List<Example<Regressor>> examples,
ImmutableOutputInfo<Regressor> outputIDInfo)
Converts a list of
Example into a Tensor representing all the outputs
in the list. |
org.tensorflow.Tensor<?> |
transform(Regressor example,
ImmutableOutputInfo<Regressor> outputIDInfo)
Converts an
Output into a Tensor representing it's output. |
List<Regressor> |
transformToBatchOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Regressor> outputIDInfo)
Converts a
Tensor containing multiple outputs into a list of Output s. |
List<Prediction<Regressor>> |
transformToBatchPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Regressor> outputIDInfo,
int[] numValidFeatures,
List<Example<Regressor>> examples)
Converts a
Tensor containing multiple outputs into a list of Prediction s. |
Regressor |
transformToOutput(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Regressor> outputIDInfo)
Converts a
Tensor into the specified output type. |
Prediction<Regressor> |
transformToPrediction(org.tensorflow.Tensor<?> tensor,
ImmutableOutputInfo<Regressor> outputIDInfo,
int numValidFeatures,
Example<Regressor> example)
Converts a
Tensor into a Prediction . |
public Prediction<Regressor> transformToPrediction(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int numValidFeatures, Example<Regressor> example)
OutputTransformer
Tensor
into a Prediction
.transformToPrediction
in interface OutputTransformer<Regressor>
tensor
- The tensor 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.public Regressor transformToOutput(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<Regressor> outputIDInfo)
OutputTransformer
Tensor
into the specified output type.transformToOutput
in interface OutputTransformer<Regressor>
tensor
- The tensor to convert.outputIDInfo
- The output info to use to identify the outputs.public List<Prediction<Regressor>> transformToBatchPrediction(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<Regressor> outputIDInfo, int[] numValidFeatures, List<Example<Regressor>> examples)
OutputTransformer
Tensor
containing multiple outputs into a list of Prediction
s.transformToBatchPrediction
in interface OutputTransformer<Regressor>
tensor
- The tensor 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.public List<Regressor> transformToBatchOutput(org.tensorflow.Tensor<?> tensor, ImmutableOutputInfo<Regressor> outputIDInfo)
OutputTransformer
Tensor
containing multiple outputs into a list of Output
s.transformToBatchOutput
in interface OutputTransformer<Regressor>
tensor
- The tensor to convert.outputIDInfo
- The output info to use to identify the outputs.public org.tensorflow.Tensor<?> transform(Regressor example, ImmutableOutputInfo<Regressor> outputIDInfo)
OutputTransformer
Output
into a Tensor
representing it's output.transform
in interface OutputTransformer<Regressor>
example
- The output to convert.outputIDInfo
- The output info to use to identify the outputs.public org.tensorflow.Tensor<?> transform(List<Example<Regressor>> examples, ImmutableOutputInfo<Regressor> outputIDInfo)
OutputTransformer
Example
into a Tensor
representing all the outputs
in the list. It accepts a list of Example rather than a list of Output for efficiency reasons.transform
in interface OutputTransformer<Regressor>
examples
- The examples to convert.outputIDInfo
- The output info to use to identify the outputs.public boolean generatesProbabilities()
OutputTransformer
generatesProbabilities
in interface OutputTransformer<Regressor>
Prediction
.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.