Class FullyWeightedVotingCombiner
java.lang.Object
org.tribuo.classification.ensemble.FullyWeightedVotingCombiner
- 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,EnsembleCombiner<Label>
A combiner which performs a weighted or unweighted vote across the predicted labels.
This uses the full distribution of predictions from each ensemble member, unlike VotingCombiner
which uses the most likely prediction for each ensemble member.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncombine(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) Combine the predictions.combine(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) Combine the supplied predictions.exportCombiner(ONNXNode input) Exports this voting combiner to ONNX.exportCombiner(ONNXNode input, T weight) Exports this voting combiner to ONNX.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenancetoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
-
Constructor Details
-
FullyWeightedVotingCombiner
public FullyWeightedVotingCombiner()Constructs a weighted voting combiner.
-
-
Method Details
-
combine
public Prediction<Label> combine(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions) Description copied from interface:EnsembleCombinerCombine the predictions.- Specified by:
combinein interfaceEnsembleCombiner<Label>- Parameters:
outputInfo- The output domain.predictions- The predictions to combine.- Returns:
- The ensemble prediction.
-
combine
public Prediction<Label> combine(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights) Description copied from interface:EnsembleCombinerCombine the supplied predictions. predictions.size() must equal weights.length.- Specified by:
combinein interfaceEnsembleCombiner<Label>- Parameters:
outputInfo- The output domain.predictions- The predictions to combine.weights- The weights to use for each prediction.- Returns:
- The ensemble prediction.
-
toString
-
getProvenance
public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()- Specified by:
getProvenancein interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-
exportCombiner
Exports this voting combiner to ONNX.The input should be a 3-tensor [batch_size, num_outputs, num_ensemble_members].
- Specified by:
exportCombinerin interfaceEnsembleCombiner<Label>- Parameters:
input- the node to be ensembled according to this implementation.- Returns:
- The leaf node of the voting operation.
-
exportCombiner
Exports this voting combiner to ONNX.The input should be a 3-tensor [batch_size, num_outputs, num_ensemble_members].
- Specified by:
exportCombinerin interfaceEnsembleCombiner<Label>- Type Parameters:
T- The type of the weights input reference.- Parameters:
input- the node to be ensembled according to this implementation.weight- The node of weights for ensembling.- Returns:
- The leaf node of the voting operation.
-