SHARE
TWEET

Untitled

a guest Jul 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. trials = 6
  2. c = 2
  3. r = int(trials / c)
  4. for i in range(1, trials + 1):
  5.     print('Trial {} of {}'.format(i, trials))
  6.  
  7.     # train NN
  8.     weights, bias, avg_cost_func, m_weights, memory, trained_model, training_data = train_nn(nn_structure, mm_structure, inputs, outputs,                                                                     window_size, horizon, iter_num, eta, momentum)
  9.  
  10.  
  11.     # FIGURE 1: plot the ROC curve for training data
  12.     fig1 = plt.figure(1, figsize=(10, 40))
  13.     fig1.suptitle('ROC curve for inhospital mortality classifier training data')
  14.  
  15.     # subplot
  16.     fig1.add_subplot(r, c, i).plot(avg_cost_func)
  17.     plt.title((('Trail {} of {}'.format(i, trials)), str(np.round(np.average(avg_cost_func), 5))))
  18.     plt.ylabel('Average J')
  19.     plt.xlabel('Iteration number')
  20.     plt.pause(0.01)
  21.     plt.show(0)
  22.     plt.subplots_adjust(wspace=0.5, hspace=1.5)
  23. plt.show()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top