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>

public final class FullyWeightedVotingCombiner extends Object implements 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 Details

  • Method Details

    • combine

      public Prediction<Label> combine(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions)
      Specified by:
      combine in interface EnsembleCombiner<Label>
    • combine

      public Prediction<Label> combine(ImmutableOutputInfo<Label> outputInfo, List<Prediction<Label>> predictions, float[] weights)
      Specified by:
      combine in interface EnsembleCombiner<Label>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProvenance

      public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
      Specified by:
      getProvenance in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
    • exportCombiner

      public org.tribuo.util.onnx.ONNXNode exportCombiner(org.tribuo.util.onnx.ONNXNode input)
      Exports this voting combiner to ONNX.

      The input should be a 3-tensor [batch_size, num_outputs, num_ensemble_members].

      Specified by:
      exportCombiner in interface EnsembleCombiner<Label>
      Parameters:
      input - the node to be ensembled according to this implementation.
      Returns:
      The leaf node of the voting operation.
    • exportCombiner

      public <T extends org.tribuo.util.onnx.ONNXRef<?>> org.tribuo.util.onnx.ONNXNode exportCombiner(org.tribuo.util.onnx.ONNXNode input, T weight)
      Exports this voting combiner to ONNX.

      The input should be a 3-tensor [batch_size, num_outputs, num_ensemble_members].

      Specified by:
      exportCombiner in interface EnsembleCombiner<Label>
      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.