The image shows the error distribution of the data:
Following is the code for error distribution:
import matplotlib.ticker as ticker
err = (Y_pred - ori_from_bc(Y_test,0.3384))/ori_from_bc(Y_test,0.3384)*100
# Error distribution using histogram
plt.figure(figsize=(7, 4))
ax = sns.distplot(err, color='g', bins=100, hist_kws={'alpha': 0.4},hist=True)
ax.xaxis.set_major_locator(ticker.MultipleLocator(50))
plt.show()
I want to calculate the percentage of test data in the error range of -30% to +30%.
Thanks in advance!