Like averaging, weighted averaging is also used for regression tasks. Alternatively, it can be used while estimating probabilities in classification problems. Base learners are assigned different weights, which represent the importance of each model in the prediction.
A weight-averaged model should always be at least as good as your best model.
Download the wisc_bc_data.csv dataset from GitHub and copy it to your working directory. Let's read the dataset:
df_cancerdata = pd.read_csv("wisc_bc_data.csv")
Take a look at the data with the following code:
We can see that the data has been read properly: