class_docstr: The BaggingEnsemble class can be used to create ensembles of stellargraph's graph neural network algorithms
  including GCN, GraphSAGE, GAT, and HinSAGE. Ensembles can be used for training classification and regression
  problems for node attribute inference and link prediction.
  
  This class can be used to create Bagging ensembles.
  
  Bagging ensembles add model diversity in two ways: (1) by random initialisation of the models' weights (before
  training) to different values; and (2) by bootstrap sampling of the training data for each model. That is, each
  model in the ensemble is trained on a random subset of the training examples, sampled with replacement from the
  original training data.
  
  .. seealso::
  
     `Examples using ensembles <https://stellargraph.readthedocs.io/en/stable/demos/ensembles/index.html>`__.
  
     Related functionality: :class:`.Ensemble` for only random initialisation.
class_docstr_tok: ["The","BaggingEnsemble","class","can","be","used","to","create","ensembles","of","stellargraph","'s","graph","neural","network","algorithms","including","GCN",",","GraphSAGE",",","GAT",",","and","HinSAGE",".","Ensembles","can","be","used","for","training","classification","and","regression","problems","for","node","attribute","inference","and","link","prediction",".","This","class","can","be","used","to","create","Bagging","ensembles",".","Bagging","ensembles","add","model","diversity","in","two","ways",":","(","1",")","by","random","initialisation","of","the","models","'","weights","(","before","training",")","to","different","values",";","and","(","2",")","by","bootstrap","sampling","of","the","training","data","for","each","model",".","That","is",",","each","model","in","the","ensemble","is","trained","on","a","random","subset","of","the","training","examples",",","sampled","with","replacement","from","the","original","training","data",".","..","seealso",":",":","`","Examples","using","ensembles","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/ensembles\/index.html",">","`","__",".","Related","functionality",":",":","class",":","`",".Ensemble","`","for","only","random","initialisation","."]
docstr: Args:
      model: A keras model.
      n_estimators (int):  The number of estimators (aka models) in the ensemble.
      n_predictions (int):  The number of predictions per query point per estimator
docstr_tok: ["Args",":","model",":","A","keras","model",".","n_estimators","(","int",")",":","The","number","of","estimators","(","aka","models",")","in","the","ensemble",".","n_predictions","(","int",")",":","The","number","of","predictions","per","query","point","per","estimator"]
code: def __init__(self, model, n_estimators=3, n_predictions=3):
      """
  
      Args:
          model: A keras model.
          n_estimators (int):  The number of estimators (aka models) in the ensemble.
          n_predictions (int):  The number of predictions per query point per estimator
      """
      super().__init__(
          model=model,
          n_estimators=n_estimators,
          n_predictions=n_predictions,
      )
  
imports: from stellargraph.layer import *
  import numpy
  from tensorflow import keras
  from tensorflow.keras.callbacks import EarlyStopping
  import stellargraph
label_desc: Use image node_id 1 to create a new BaggingEnsemble object from inherited base classes: Ensemble with example: obj = BaggingEnsemble(model, n_estimators, n_predictions)