Esempio n. 1
0
 def full_info_upperbound(self,x,S):
     fx = self.f([x])
     marg = fx
     if len(S) == 0:
         return marg
     xi = max(S,key=lambda xi:garea(self.dist(x,xi),fx,self.f([xi])))
     return fx - garea(self.dist(x,xi),fx,self.f([xi]))
Esempio n. 2
0
 def upperbound(self,x,S,a):
     fx = self.f([x])
     marg = fx
     if len(S) == 0:
         return marg
     xi = max(S,key=lambda xi:garea(self.dist(x,xi),fx,a))
     return max([fx - garea(self.dist(x,xi),fx,a),0])
Esempio n. 3
0
 def augmented_upperbound(self,x,Xin,Xout,a,Xin_val):
     fx_Xin = self.fast_delta(x,Xin,Xin_val)
     fx = self.f([x]) 
     marg = fx_Xin
     if len(Xout) == 0:
         return marg
     x_h = max(Xout,key=lambda xi:garea(self.dist(x,xi),fx,a))
     return max([fx_Xin - garea(self.dist(x,x_h),fx,a),0])
Esempio n. 4
0
 def full_info_lowerbound(self,x,S):
     fx = self.f([x])
     marg = fx
     for s in S:
         d = self.dist(x,s)
         marg += - garea(d,fx,self.f([s]))
     return marg
Esempio n. 5
0
 def lowerbound(self,x,S,b):
     fx = self.f([x])
     marg = fx
     for s in S:
         d = self.dist(x,s)
         marg += - garea(d,fx,b)
     return max([marg,0])
Esempio n. 6
0
 def augmented_lowerbound(self,x,Xin,Xout,b,Xin_val):
     fx_Xin = self.fast_delta(x,Xin,Xin_val)
     fx = self.f([x]) 
     marg = fx_Xin
     for x_out in Xout:
         d = self.dist(x,x_out)
         marg += -garea(d,fx,b) 
     return max([marg,0])