public final class XGBoostRegressionConverter extends Object implements XGBoostOutputConverter<Regressor>
Regressor
Prediction
s.
Instances of this class are stateless and thread-safe.
Constructor and Description |
---|
XGBoostRegressionConverter()
Construct an XGBoostRegressionConverter.
|
Modifier and Type | Method and Description |
---|---|
List<Prediction<Regressor>> |
convertBatchOutput(ImmutableOutputInfo<Regressor> info,
List<float[][]> probabilities,
int[] numValidFeatures,
Example<Regressor>[] examples)
Converts a list of float arrays from XGBoost Boosters into a Tribuo
Prediction . |
Prediction<Regressor> |
convertOutput(ImmutableOutputInfo<Regressor> info,
List<float[]> probabilities,
int numValidFeatures,
Example<Regressor> example)
Converts a list of float arrays from XGBoost Boosters into a Tribuo
Prediction . |
boolean |
generatesProbabilities()
Does this converter produce probabilities?
|
public XGBoostRegressionConverter()
public boolean generatesProbabilities()
XGBoostOutputConverter
generatesProbabilities
in interface XGBoostOutputConverter<Regressor>
public Prediction<Regressor> convertOutput(ImmutableOutputInfo<Regressor> info, List<float[]> probabilities, int numValidFeatures, Example<Regressor> example)
XGBoostOutputConverter
Prediction
.convertOutput
in interface XGBoostOutputConverter<Regressor>
info
- The output info.probabilities
- The XGBoost output.numValidFeatures
- The number of valid features used in the prediction.example
- The example this prediction was generated from.public List<Prediction<Regressor>> convertBatchOutput(ImmutableOutputInfo<Regressor> info, List<float[][]> probabilities, int[] numValidFeatures, Example<Regressor>[] examples)
XGBoostOutputConverter
Prediction
.convertBatchOutput
in interface XGBoostOutputConverter<Regressor>
info
- The output info.probabilities
- The XGBoost output, list dimension is across models, first array dimension is across examples, second array dimension is across outputs.numValidFeatures
- The number of valid features used in each prediction.examples
- The examples these predictions were generated from.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.