The correct answer is D. all of above.
There are several ways to assign weights to the output of different models in an ensemble. One way is to use an algorithm to return the optimal weights. This can be done using a variety of methods, such as least squares, ridge regression, or lasso regression. Another way to assign weights is to choose the weights using cross validation. This involves splitting the data into multiple subsets, training each model on a different subset, and then evaluating the performance of each model on the held-out subset. The weights are then chosen so that the ensemble model performs best on the held-out subset. Finally, one can also give high weights to more accurate models. This is a simple and intuitive approach, but it can be suboptimal if the models are not perfectly correlated.
In general, the best way to assign weights to the output of different models in an ensemble will depend on the specific problem and the data. However, all of the methods described above can be effective in practice.