def fit_all_models(self): functions = {} inputs_list = [ self.B, self.F, np.hstack((self.D, self.C)), np.hstack((self.B, self.C)), np.hstack((self.A, self.C, self.E)), np.hstack((self.B, self.C, self.D)), np.hstack((self.D, self.E, self.C, self.A)), np.hstack((self.B, self.E, self.C, self.A)), np.hstack((self.A, self.B, self.C, self.D, self.E)), np.hstack((self.A, self.B, self.C, self.D, self.E, self.F)) ] output_list = [ self.C, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y ] name_list = [ 'gp_C', 'gp_A', 'gp_D_C', 'gp_B_C', 'gp_A_C_E', 'gp_B_C_D', 'gp_D_E_C_A', 'gp_B_E_C_A', 'gp_A_B_C_D_E', 'gp_A_B_C_D_E_F' ] parameter_list = [[1., 1., 0.0001, False], [1., 1., 10., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 10., False], [1., 1., 1., False], [1., 1., 10., False], [1., 1., 10., False], [1., 1., 10., False], [1., 1., 10., False]] ## Fit all conditional models for i in range(len(inputs_list)): X = inputs_list[i] Y = output_list[i] functions[name_list[i]] = fit_single_GP_model( X, Y, parameter_list[i]) return functions
def refit_models(self, observational_samples): Y = np.asarray(observational_samples['Y'])[:, np.newaxis] N = np.asarray(observational_samples['N'])[:, np.newaxis] CO = np.asarray(observational_samples['CO'])[:, np.newaxis] T = np.asarray(observational_samples['T'])[:, np.newaxis] D = np.asarray(observational_samples['D'])[:, np.newaxis] P = np.asarray(observational_samples['P'])[:, np.newaxis] O = np.asarray(observational_samples['O'])[:, np.newaxis] S = np.asarray(observational_samples['S'])[:, np.newaxis] L = np.asarray(observational_samples['L'])[:, np.newaxis] TE = np.asarray(observational_samples['TE'])[:, np.newaxis] C = np.asarray(observational_samples['C'])[:, np.newaxis] functions = {} inputs_list = [ N, np.hstack((O, S, T, D, TE)), np.hstack((C, N, L, TE)), np.hstack((T, S)), np.hstack((D, S)), np.hstack((N, O, S, T, D, TE)), np.hstack((N, T, S)), np.hstack((N, D, S)), np.hstack((O, C, N, L, TE, S, T, D)), np.hstack((T, C, S, TE, L, N)), np.hstack((T, D, S)), np.hstack((C, D, S, TE, L, N)), np.hstack((N, C, T, S, N, L, TE)), np.hstack((N, T, D, S)), np.hstack((C, T, D, S, N, L, TE)) ] output_list = [Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y] name_list = [ 'gp_N', 'gp_O_S_T_D_TE', 'gp_C_N_L_TE', 'gp_T_S', 'gp_D_S', 'gp_N_O_S_T_D_TE', 'gp_N_T_S', 'gp_N_D_S', 'gp_O_C_N_L_TE_S_T_D', 'gp_T_C_S_TE_L_N', 'gp_T_D_S', 'gp_C_D_S_TE_L_N', 'gp_N_C_T_S_N_L_TE', 'gp_N_T_D_S', 'gp_C_T_D_S_N_L_TE' ] parameter_list = [[1., 1., 10., False], [1., 1., 1., True], [1., 1., 1., True], [1., 1., 1., True], [1., 1., 10., True], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False]] ## Fit all conditional models for i in range(len(inputs_list)): X = inputs_list[i] Y = output_list[i] functions[name_list[i]] = fit_single_GP_model( X, Y, parameter_list[i]) return functions
def fit_all_models(self): functions = {} inputs_list = [ self.N, np.hstack((self.O, self.S, self.T, self.D, self.TE)), np.hstack((self.C, self.N, self.L, self.TE)), np.hstack((self.T, self.S)), np.hstack((self.D, self.S)), np.hstack((self.N, self.O, self.S, self.T, self.D, self.TE)), np.hstack((self.N, self.T, self.S)), np.hstack((self.N, self.D, self.S)), np.hstack((self.O, self.C, self.N, self.L, self.TE, self.S, self.T, self.D)), np.hstack((self.T, self.C, self.S, self.TE, self.L, self.N)), np.hstack((self.T, self.D, self.S)), np.hstack((self.C, self.D, self.S, self.TE, self.L, self.N)), np.hstack( (self.N, self.C, self.T, self.S, self.N, self.L, self.TE)), np.hstack((self.N, self.T, self.D, self.S)), np.hstack( (self.C, self.T, self.D, self.S, self.N, self.L, self.TE)) ] output_list = [ self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y, self.Y ] name_list = [ 'gp_N', 'gp_O_S_T_D_TE', 'gp_C_N_L_TE', 'gp_T_S', 'gp_D_S', 'gp_N_O_S_T_D_TE', 'gp_N_T_S', 'gp_N_D_S', 'gp_O_C_N_L_TE_S_T_D', 'gp_T_C_S_TE_L_N', 'gp_T_D_S', 'gp_C_D_S_TE_L_N', 'gp_N_C_T_S_N_L_TE', 'gp_N_T_D_S', 'gp_C_T_D_S_N_L_TE' ] parameter_list = [[1., 1., 10., False], [1., 1., 1., True], [1., 1., 1., True], [1., 1., 1., True], [1., 1., 10., True], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False], [1., 1., 1., False]] ## Fit all conditional models for i in range(len(inputs_list)): X = inputs_list[i] Y = output_list[i] functions[name_list[i]] = fit_single_GP_model( X, Y, parameter_list[i]) return functions
def refit_models(self, observational_samples): A = np.asarray(observational_samples['A'])[:, np.newaxis] B = np.asarray(observational_samples['B'])[:, np.newaxis] C = np.asarray(observational_samples['C'])[:, np.newaxis] D = np.asarray(observational_samples['D'])[:, np.newaxis] E = np.asarray(observational_samples['E'])[:, np.newaxis] F = np.asarray(observational_samples['F'])[:, np.newaxis] Y = np.asarray(observational_samples['Y'])[:, np.newaxis] functions = {} inputs_list = [ B, np.hstack((A, C, E)), np.hstack((D, C)), np.hstack((B, C)), np.hstack((B, C, D)), np.hstack((D, E, C, A)), np.hstack((B, E, C, A)) ] output_list = [C, Y, Y, Y, Y, Y, Y, Y] name_list = [ 'gp_C', 'gp_A_C_E', 'gp_D_C', 'gp_B_C', 'gp_B_C_D', 'gp_D_E_C_A', 'gp_B_E_C_A' ] parameter_list = [[1., 1., 10., False], [1., 1., 10., False], [1., 1., 1., False], [1., 1., 10., False], [1., 1., 10., False], [1., 1., 10., False], [1., 1., 10., False]] ## Fit all conditional models for i in range(len(inputs_list)): X = inputs_list[i] Y = output_list[i] functions[name_list[i]] = fit_single_GP_model( X, Y, parameter_list[i]) return functions