rstudio / tfprobability

R interface to TensorFlow Probability
https://rstudio.github.io/tfprobability/
Other
54 stars 16 forks source link

Special prefix for methods? #90

Open dfalbel opened 5 years ago

dfalbel commented 5 years ago

I find it confusing that methods have the same prefix as the class creators. For example:

tfd_normal returns a Normal distribution and tfd_sample takes samples of this distribution.

The same goes for bijectors: tfb_affine creates an object and tfb_forward applies it.

Can we consider using different prefix for the methods?

skeydan commented 5 years ago

The idea was following the Python directory structure (equivalently, the aliases they use) as closely as possible (if at all possible). In general, in my view this works well, with the notable exception of tfd_sample_distribution (wrapping tfd.Sample as opposed to tfd.sample...).

If we want to differentiate between "nouns" and "verbs", we'd need to do this consistently through all modules and come up with a workable scheme (also, e.g., for mcmc, sts...)

Do you have a suggestion?