docstr: build train_mask test_mask val_mask
docstr_tok: ["build","train_mask","test_mask","val_mask"]
code: def build_train_val_test(self):
      """
      build train_mask test_mask val_mask
      """
      train_precent = self.clf_ratio
      training_size = int(
          train_precent * self.graph.G.number_of_nodes()
      )
      state = np.random.get_state()
      np.random.seed(0)
      shuffle_indices = np.random.permutation(
          np.arange(self.graph.G.number_of_nodes())
      )
      np.random.set_state(state)
  
      look_up = self.graph.look_up_dict
      g = self.graph.G
  
      def sample_mask(begin, end):
          mask = np.zeros(g.number_of_nodes())
          for i in range(begin, end):
              mask[shuffle_indices[i]] = 1
          return mask
  
      # nodes_num = len(self.labels)
      # self.train_mask = sample_mask('train', nodes_num)
      # self.val_mask = sample_mask('valid', nodes_num)
      # self.test_mask = sample_mask('test', nodes_num)
      self.train_mask = sample_mask(0, training_size - 100)
      self.val_mask = sample_mask(training_size - 100, training_size)
      self.test_mask = sample_mask(training_size, g.number_of_nodes())
  
file_path: OpenNE/src/openne/gcn/gcnAPI.py
imports: import numpy
  from .utils import *
  from .None import models
  import time
  import scipy.sparse
  import tensorflow
label_desc: Use image node_id 5 for calling the GCN obj's underlying member method code with example usage: obj.build_train_val_test() and returns: mask