rafguns / linkpred

Easy link prediction tool
Other
141 stars 46 forks source link

Clarify `excluded` parameter to `Predictor.__init__` #19

Open rafguns opened 6 years ago

rafguns commented 6 years ago

12 showed that the intended use of excluded can be misunderstood. As I write there:

Note that the excluded argument to a predictor (SimRank in this case) is intended to exclude certain edges from appearing in the results, not to exclude them during training.

So I think two things need to happen:

rafguns commented 6 years ago

The doc string is actually fairly clear: https://github.com/rafguns/linkpred/blob/master/linkpred/predictors/base.py#L48. As it says

This is useful to, for instance, make sure that we only predict new links that are not currently in G.

Maybe a clearer (but somewhat less flexible) solution would be to revert the API to what was there many years ago: a boolean argument only_new (or a similar name).