class_docstr: ```
  predicts graph node's classes
  ```
docstr: ```
  Performs link prediction
  If return_proba is True, returns probabilities of each class.
  ```
docstr_tok: ["``","`","Performs","link","prediction","If","return_proba","is","True",",","returns","probabilities","of","each","class",".","``","`"]
code: def predict(self, G, edge_ids, return_proba=False, verbose=0):
      """
      ```
      Performs link prediction
      If return_proba is True, returns probabilities of each class.
      ```
      """
      gen = self.preproc.preprocess(G, edge_ids)
      gen.batch_size = self.batch_size
      # *_generator methods are deprecated from TF 2.1.0
      # preds = self.model.predict_generator(gen)
      preds = self.model.predict(gen, verbose=verbose)
      preds = np.squeeze(preds)
      if return_proba:
          return [[1 - pred, pred] for pred in preds]
      result = np.where(preds > 0.5, self.c[1], self.c[0])
      return result
  
file_path: ktrain/ktrain/graph/predictor.py
imports: from ..None import utils
  from ..imports import *
  from ..predictor import Predictor
  from .preprocessor import LinkPreprocessor, NodePreprocessor
label_desc: Use image node_id 3 for calling the LinkPredictor obj's underlying member method code with example usage: obj.predict(G, edge_ids, return_proba, verbose) and returns: result, unknown