1DconstrainedBayesianOptimisation.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Bayesian-Optimisation 作者: hyperc54 项目源码 文件源码
def updatePlot(self):
        self.ax.clear()
        self.ax.plot(self.x_real,self.y_real)
        self.ax.scatter(self.x_sample,self.y_sample,s=100)       
        self.ax.plot(self.x_pred,self.y_pred)

        if self.constraint:
            self.ax.plot(self.x_real,np.zeros(len(self.x_real)))
        else:
            self.ax.fill_between(self.x_pred.ravel(),self.y_pred-5*np.sqrt(self.sigma2_pred),self.y_pred+5*np.sqrt(self.sigma2_pred),color='black',alpha=0.1) #Confidence intervals
            ax2.clear()
            if ACQUIS==0:
                ax2.fill_between(self.x_acquis.ravel(),np.zeros(len(self.x_acquis)),[(1-x)*(max(self.y_acquis)) for x in infeasibility],color='red',alpha=0.1)
            ax2.fill_between(self.x_acquis.ravel(),np.zeros(len(self.y_acquis)),self.y_acquis,color='green',alpha=0.1)


#%% Index
#Button class for interactive simulation
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号