def __init__(self, ?=0.95, c=0.6, F_a=1, F_b=1, G_a=3, G_b=1.2,
w_max=2, w_grid_size=40, ?_grid_size=40):
self.?, self.c, self.w_max = ?, c, w_max
self.F = ?_distribution(F_a, F_b, scale=w_max)
self.G = ?_distribution(G_a, G_b, scale=w_max)
self.f, self.g = self.F.pdf, self.G.pdf # Density functions
self.?_min, self.?_max = 1e-3, 1 - 1e-3 # Avoids instability
self.w_grid = np.linspace(0, w_max, w_grid_size)
self.?_grid = np.linspace(self.?_min, self.?_max, ?_grid_size)
x, y = np.meshgrid(self.w_grid, self.?_grid)
self.grid_points = np.column_stack((x.ravel(1), y.ravel(1)))
评论列表
文章目录