I have this kernel with the following code in which I want to run different n_estimators on my test set:
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
for n_estimators in [5, 25, 50, 100, 250, 500]:
my_mae = get_mae(n_estimators, train_X, test_X, train_y, test_y)
print(n_estimators, my_mae)
The output is (n_estimators, my_mae):
- 5, 108070.017
- 25, 54273.79
- 50, 55912.80
Now, I want to plot each of these 3 data points in a chart with matplotlib. How do I do this given the code snippet below? I am not sure where in the loop to add which piece of the code for it to show. Please help.