snap-stanford / deepsnap

Python library assists deep learning on graphs
https://snap.stanford.edu/deepsnap/
MIT License
542 stars 57 forks source link

what is deepsnap.dataset.EnsembleGenerator? #14

Open lihuiliullh opened 3 years ago

lihuiliullh commented 3 years ago

I couldn't find the detailed tutorial of EnsembleGenerator in your document. Could you give an example of how EnsembleGenerator works? What is the meaning of each parameter?

zechengz commented 3 years ago

Hi, sorry about the late reply. Basically, EnsembleGenerator is a generator composed of a list of generators. Those generators will have gen_prob probabilities to be sampled or used to generate the graph (if not specified each generator will have the same probabilities to be sampled). The probability of each generator is specified at the corresponding position in the gen_prob array.

We have a simple example in the test case https://github.com/snap-stanford/deepsnap/blob/c9f3e3f212c556cf9b231bcf140c50d9d5ee0d51/tests/test_dataset.py#L2185In the future, we might add more examples.