EI (expected improvement) graphs
In [6]:
import pandas as pd
import numpy as np
import scipy.stats as s
import seaborn as sns
import matplotlib.pylab as plt
%matplotlib inline
In [13]:
sns.set(font_scale=2)
In [14]:
X = [x for x in np.linspace(0, 10, 100)]
l = [s.chi2.pdf(x, 5) for x in X]
plt.plot(X, l, label='Pdf of the error')
plt.xlabel('Error', fontsize=20)
plt.ylabel('Probability of the error', fontsize=20)
plt.axvline(2., linestyle='--', color=sns.xkcd_rgb["denim blue"], lw=0.5, label='Target error')
plt.legend()
Out[14]:
In [15]:
X = [x for x in np.linspace(0, 10, 100)]
l = [max(2. - x, 0) for x in X]
plt.plot(X, l)
plt.xlabel('Error')
plt.ylabel('Improvement')
plt.legend()