Blend the predictions of several models with fixed weights. predictions has shape (n_models, n_samples) and weights has one non-negative entry per model; the weights are normalised to sum to 1 before use.
Implement solve(predictions,weights).
Returns. Return a NumPy array of length n_samples, the weighted average of the models' predictions.
Example 1
Input:
solve([[1.0, 2.0], [3.0, 4.0]], [1.0, 3.0])
Output:
[2.5, 3.5]
Example 2
Input:
solve([[10.0, 20.0], [0.0, 0.0]], [1.0, 1.0])
Output:
[5.0, 10.0]
No results yet
Run your code to check it against the examples, or submit to run every test.