reduce_majority() makes a reducer for ensemble() that returns the
output whose value occurs most often. It is the default reducer.
Value
A function function(outputs, weights = NULL) for the reduce_fn
argument of ensemble().
Details
Values are compared as strings. If the ensemble has weights, each vote
counts with its module's weight. The reducer returns the whole output of
the first module that gave the winning value.
See also
Other composition:
as_reward_fn(),
best_of_n(),
ensemble(),
module-graph,
pipeline(),
reduce_best_by_metric(),
reduce_first(),
reduce_weighted_vote(),
refine(),
step(),
with_assertions()