greta-dev / greta-dev/greta

Clearer documentation

Open
#144 3 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
C++
Stars
607
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
1

Description

I was not sure that these points had been covered in earlier issues, so opening a new one.
As a data scientist new to PPLs, I found the documentation hard to follow.

In particular :

1. Where does the "inference" happen exactly ? What is the connection between
`distribution(y) <- normal(mean, sd)` which expresses the relationship between the parameters (whose priors have been defined) and the target variable (the data we want to explain/fit to) and
`m <- model(int, coef, sd)` which is only a function of the parameters. How does `m` know about `y` or the structure of the model ? (it clearly does, since `plot(m)` plots the structure of the model).. so clearly, `distribution(y) <- normal(mean, sd)` and `m <- model(int, coef, sd)` are intimately connected... but how ?

2. It would be excellent to have examples in the form of full (even if small) workflows. i.e.
- experimental data with a clearly understood relationship between predictors and target variable
- plausible mathematical model for target variable in terms of predictors
- greta implementation of said model
- greta fit to the experimental data
- some measure of the "goodness of fit".. at least by inspection, where one might plot the model with the inferred parameters against raw data.

3. Some explanation of where in the workflow tensorflow is used and how this is beneficial. An example with a non-trivial data set (larger than would be practicable without tensorflow) would make the benefits of the tf backend explicit.

4. A function to `predict` would be a good idea. Given a model that has been fitted (again, do the learned/fitted parameters live in the model structure ? do they live in `draws` ? can the learned parameters be put into the model to generate data ?) the user should be able to save the model (as a .h5 file, ideally) and generate the target variable from this model, given values of the predictor variables.

I love the project (I came to it via the Tensorflow talk JJ Allaire gave at rstudio::conf2018) and would love to see it blossom, congratulations on some excellent work.

I worked out a simple linear regression in Greta just to get myself to understand Greta better. https://theclarkeorbit.github.io/greta-playground.html.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.