dim = 1 seed = 22 method = 'brute' # possible methods: 'brute', 'vi', 'means', 'svi' parametrization = 'natural' # possible parametrizations for svi method: cholesky, natural ind_inputs_num = 5 max_iter = 100 lbfgsb_options = {'maxiter': max_iter, 'disp': False} np.random.seed(seed) x_tr = np.random.rand(dim, num) if dim == 1: x_test = np.linspace(0, 1, test_num) x_test = x_test.reshape(1, test_num) else: x_test = np.random.rand(dim, test_num) y_tr, y_test = gp.generate_data(x_tr, x_test, seed=seed) data_points = [] data_targets = [] fig = plt.figure() gp_plot_reg_data(x_test, y_test, 'y-') means_gp = GPR(model_covariance_obj, method='means') means_gp.fit(x_tr, y_tr, num_inputs=ind_inputs_num, optimizer_options=lbfgsb_options) print(model_covariance_obj.get_params()) means_inducing_points, means_mean, means_cov = means_gp.inducing_inputs means_y_test, means_high, means_low = means_gp.predict(x_test) def onclick(event):