# ax[1].plot(x, y, c='0.25') x = np.unique(nm_summ_short) z = np.array(z) ax[0].plot(x[x <= 1000], z[x <= 1000], c='0.25', ls='--') ax[0].scatter(est2.model_runs, est2.dofs.sum(), zorder=10, c='0.25', s=75, marker='*') ax[0].set_xticks(np.arange(200, 1010, 200)) ax[0].set_xlim(0, 1000) ax[0].set_ylim(50, 216) ax[0].set_facecolor('0.98') ax[0] = fp.add_labels(ax[0], xlabel='Total Model Runs', ylabel='Optimal\nDOFS', labelpad=config.LABEL_PAD / 2) # Plot number of model run contours (lines) levels = [250, 750, 1250] # locs = [(n/8, n/8), # (n/2, n/2), # (5*n/8, 5*n/8)] locs = [(mr2n(l) / 2, mr2n(l) / 2) for l in levels] # nm_summ[0, :] -= 1 # nm_summ[1:, 0] -= 1 cl = ax[1].contour(nm_summ, levels=levels, colors='white', linestyles='dotted') ax[1].clabel(cl, cl.levels, inline=True,
# ax[1].plot(x, y, c='0.25') x = np.unique(nm_summ_short) z = np.array(z) ax[0].plot(x[x <= 1000], z[x <= 1000], c='0.25', ls='--') ax[0].scatter(est2.model_runs, est2.dofs.sum(), zorder=10, c='0.25', s=75, marker='*') ax[0].set_xticks(np.arange(200, 1010, 200)) ax[0].set_xlim(0, 1000) ax[0].set_ylim(50, true.dofs.sum()) ax[0].set_facecolor('0.98') ax[0] = fp.add_labels(ax[0], xlabel='Total model runs', ylabel='Optimal\nDOFS', labelpad=config.LABEL_PAD / 2) # Print information about this print('-' * 25) print(x[z >= 99]) print(z[z >= 99]) print('-' * 25) print('\n') # Plot number of model run contours (lines) levels = [250, 750, 1250] # locs = [(n/8, n/8), # (n/2, n/2), # (5*n/8, 5*n/8)] locs = [(mr2n(l) / 2, mr2n(l) / 2) for l in levels]
est0 = inv.ReducedRankJacobian(k_est.values, xa.values, sa_vec.values, y.values, y_base.values, so_vec.values) est0.xa_abs = xa_abs * 1e3 est0.rf = RF est0.edecomp() est0.solve_inversion() ######################################## ### BUILD REDUCED DIMENSION JACOBIAN ### ######################################## # Reduced dimension fig, ax = fp.get_figax(aspect=4, rows=2, cols=1) ax[0] = fp.add_labels(ax[0], xlabel='Number of Native-Resolution Grid Cells', ylabel='DOFS per Cluster') est1_ms = est0.update_jacobian_rd(true.k, true.xa_abs, true.sa_vec, clusters_plot, n_cells=[2098], n_cluster_size=[2098]) nstate_record_01 = [est1_ms.nstate] dpc_record_01 = [est1_ms.dofs.sum() / est1_ms.nstate] indices = np.arange(10, 160, 10) for i in indices: est1_ms = est0.update_jacobian_rd(true.k, true.xa_abs,