Accenture / AmpliGraph

Python library for Representation Learning on Knowledge Graphs https://docs.ampligraph.org
Apache License 2.0
2.16k stars 250 forks source link

How to use generate_corruptions_for_fit() to train the model? #245

Closed lzw950905 closed 3 years ago

lzw950905 commented 3 years ago

When I use the tutorial about 'train and evaluate the model', we use model = mymodel(....), and one of parameter is eta(the number of corruption produced from a positive triple). And I notice we could generate corruption from batch(generate_corruptions_for_fit()), so I want to know how could I use this function at the whole training process?

sumitpai commented 3 years ago

The model.fit() function uses generate_corruptions_for_fit internally and generates eta corruptions per triple.

https://docs.ampligraph.org/en/1.3.2/examples.html

Here is an example to train the model on your dataset