public final class XGBoostClassificationConverter extends Object implements XGBoostOutputConverter<Label>
Label
Prediction
s.Constructor and Description |
---|
XGBoostClassificationConverter() |
Modifier and Type | Method and Description |
---|---|
List<Prediction<Label>> |
convertBatchOutput(ImmutableOutputInfo<Label> info,
List<float[][]> probabilitiesList,
int[] numValidFeatures,
Example<Label>[] examples)
Converts a list of float arrays from XGBoost Boosters into a Tribuo
Prediction . |
Prediction<Label> |
convertOutput(ImmutableOutputInfo<Label> info,
List<float[]> probabilitiesList,
int numValidFeatures,
Example<Label> example)
Converts a list of float arrays from XGBoost Boosters into a Tribuo
Prediction . |
boolean |
generatesProbabilities()
Does this converter produce probabilities?
|
public boolean generatesProbabilities()
XGBoostOutputConverter
generatesProbabilities
in interface XGBoostOutputConverter<Label>
public Prediction<Label> convertOutput(ImmutableOutputInfo<Label> info, List<float[]> probabilitiesList, int numValidFeatures, Example<Label> example)
XGBoostOutputConverter
Prediction
.convertOutput
in interface XGBoostOutputConverter<Label>
info
- The output info.probabilitiesList
- The XGBoost output.numValidFeatures
- The number of valid features used in the prediction.example
- The example this prediction was generated from.public List<Prediction<Label>> convertBatchOutput(ImmutableOutputInfo<Label> info, List<float[][]> probabilitiesList, int[] numValidFeatures, Example<Label>[] examples)
XGBoostOutputConverter
Prediction
.convertBatchOutput
in interface XGBoostOutputConverter<Label>
info
- The output info.probabilitiesList
- 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.