Ensemble Methods
In this problem, you will implement a basic ensemble method using NumPy. Ensemble methods combine the predictions of multiple models to improve the overall accuracy.
**Example:** Suppose we have two models, Model A and Model B, that predict the probability of a patient having a disease. We can combine their predictions using a weighted average.
**Constraints:** You must use NumPy to perform the calculations.
Write a function that takes in the predictions of two models and returns the combined prediction.
Test Cases
Test Case 1
Input:
[[0.8, 0.2], [0.7, 0.3]]Expected:
0.85Test Case 2
Input:
[[0.9, 0.1], [0.6, 0.4]]Expected:
0.85Test Case 3
Input:
[[0.5, 0.5], [0.3, 0.7]]Expected:
undefinedTest Case 4
Input:
[[0.2, 0.8], [0.1, 0.9]]Expected:
undefinedTest Case 5
Input:
[[0.4, 0.6], [0.7, 0.3]]Expected:
undefined