print Z.shape s = 0 print Z[0, 0] print Z[399, 399] for x in range(400): for y in range(400): s = s + Z[x, y] print s surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=plt.get_cmap("coolwarm"), linewidth=0, antialiased=True) fig.colorbar(surf, shrink=0.5, aspect=5) # plt.savefig('3dgauss.png') # plt.clf() plt.show() if __name__ == "__main__": headers, attacks = preprocessing.get_header_data() headers.remove("protocol_type") headers.remove("attack") headers.remove("difficulty") df_training_20, df_training_full, gmms_20, gmms_full = preprocessing.get_preprocessed_training_data() df_test_20, df_test_full, gmms_test_20, gmms_test_full = preprocessing.get_preprocessed_test_data() title = "training20_only" logger.debug("#################################################") logger.debug(title) test()
Y, Z, rstride=1, cstride=1, cmap=plt.get_cmap('coolwarm'), linewidth=0, antialiased=True) fig.colorbar(surf, shrink=0.5, aspect=5) # plt.savefig('3dgauss.png') # plt.clf() plt.show() if __name__ == '__main__': headers, attacks = preprocessing.get_header_data() headers.remove('protocol_type') headers.remove('attack') headers.remove('difficulty') df_training_20, df_training_full, gmms_20, gmms_full = preprocessing.get_preprocessed_training_data( ) df_test_20, df_test_full, gmms_test_20, gmms_test_full = preprocessing.get_preprocessed_test_data( ) title = "training20_only" logger.debug("#################################################") logger.debug(title) test()