I'm trying to plot the results of my XGBoost model and I'm running into this error: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I'm very new to Python and was following a guide, but I can't figure out how to change this code so that the error doesn't occur, here's the code causing it (1st line is the problem):
lm = [y for _,y in sorted(zip(val_lb, y_test_lb), reverse = True)]
x = np.arange(0,total + 1)
y = np.append([0],np.cumsum(lm))
plt.plot(x, y, c = 'b', label = 'XGBoost', linewidth = 2)
I'm trying to get an output of something like this:
Hopefully this is helpful, thanks.