class_docstr: Convenience Class for training and evaluating multitask graph convolutional network 
class_docstr_tok: ["Convenience","Class","for","training","and","evaluating","multitask","graph","convolutional","network"]
code: def evaluate(
      self,
      train_features,
      test_features,
      y_train,
      y_test,
      transformer,
      batch_size=32,
  ):
      self.net.eval()
      print("TRAIN:")
  
      o = []
      l = []
  
      train_inds = range(0, len(train_features))
  
      for b in range(0, len(train_features) / batch_size):
          batch_inds = [
              train_inds[idx]
              for idx in range(b * batch_size, (b + 1) * batch_size)
          ]
  
          train_x_batch = np.concatenate(
              [
                  np.expand_dims(train_features[idx]["x"], 0)
                  for idx in batch_inds
              ],
              axis=0,
          )
          train_g_batch = np.concatenate(
              [
                  np.expand_dims(train_features[idx]["g"], 0)
                  for idx in batch_inds
              ],
              axis=0,
          )
  
          xb = torch.from_numpy(train_x_batch.astype(np.float32)).cuda()
          gb = torch.from_numpy(train_g_batch.astype(np.float32)).cuda()
  
          self.input_x.resize_as_(xb).copy_(xb)
          self.input_g.resize_as_(gb).copy_(gb)
  
          input_xv = Variable(self.input_x)
          input_gv = Variable(self.input_g)
  
          output = self.net(input_gv, input_xv)
  
          if transformer is not None:
              o.append(
                  transformer.inverse_transform(
                      output.data.cpu().numpy().reshape((-1, 1))
                  ).flatten()
              )
              l.append(
                  transformer.inverse_transform(
                      y_train[batch_inds].reshape((-1, 1))
                  ).flatten()
              )
          else:
              o.append(
                  output.data.cpu().numpy().reshape((-1, 1)).flatten()
              )
              l.append(y_train[batch_inds].reshape((-1, 1)).flatten())
  
      o = np.concatenate(o)
      l = np.concatenate(l)
      print("RMSE:")
      print(np.sqrt(np.mean(np.square(l - o))))
      print("ROC AUC:")
      print(roc_auc_score(l, o))
  
      o = []
      l = []
  
      print("TEST:")
      test_inds = range(0, len(test_features))
  
      for b in range(0, len(test_features) / batch_size):
          batch_inds = [
              test_inds[idx]
              for idx in range(b * batch_size, (b + 1) * batch_size)
          ]
  
          test_x_batch = np.concatenate(
              [
                  np.expand_dims(test_features[idx]["x"], 0)
                  for idx in batch_inds
              ],
              axis=0,
          )
          test_g_batch = np.concatenate(
              [
                  np.expand_dims(test_features[idx]["g"], 0)
                  for idx in batch_inds
              ],
              axis=0,
          )
  
          xb = torch.from_numpy(test_x_batch.astype(np.float32)).cuda()
          gb = torch.from_numpy(test_g_batch.astype(np.float32)).cuda()
  
          self.input_x.resize_as_(xb).copy_(xb)
          self.input_g.resize_as_(gb).copy_(gb)
  
          input_xv = Variable(self.input_x)
          input_gv = Variable(self.input_g)
  
          output = self.net(input_gv, input_xv)
  
          if transformer is not None:
              o.append(
                  transformer.inverse_transform(
                      output.data.cpu().numpy().reshape((-1, 1))
                  ).flatten()
              )
              l.append(
                  transformer.inverse_transform(
                      y_test[batch_inds].reshape((-1, 1))
                  ).flatten()
              )
          else:
              o.append(
                  output.data.cpu().numpy().reshape((-1, 1)).flatten()
              )
              l.append(y_test[batch_inds].reshape((-1, 1)).flatten())
  
      o = np.concatenate(o)
      l = np.concatenate(l)
      print("RMSE:")
      print(np.sqrt(np.mean(np.square(l - o))))
      print("ROC AUC:")
      print(roc_auc_score(l, o))
  
imports: import torch.nn
  import torch.nn.parallel
  import torch.backends.cudnn
  from torch.autograd import Variable
  import torch.optim
  import random
  import numpy
  from sklearn.metrics import roc_auc_score
label_desc: Use image node_id 4 for calling the MultiTaskGraphConvolution obj's underlying member method code with example usage: obj.evaluate(train_features, test_features, y_train, y_test, transformer, batch_size) without return types