Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

James.yang/var vec mat #37

Merged
merged 50 commits into from
Jul 18, 2020
Merged

James.yang/var vec mat #37

merged 50 commits into from
Jul 18, 2020

Conversation

JamesYang007
Copy link
Owner

@JamesYang007 JamesYang007 commented Jun 8, 2020

TODO:

  • Expression Checker moved to later issue
    • Generative Model Checking:
      • no variable gets assigned a distribution more than once
      • no variable gets assigned a distribution that references the same variable
      • no distribution references variables below it (ones that are assigned a distribution after current variable)
  • Data/DataView with ppl::mat support
  • ppl::dot
  • extend fastad to support AD node for DotNode not needed!
  • finish unit-testing everything that was temporarily given dummy tests
  • test operator[] for vector-like param viewers
  • refactor mcmc with new design
  • update README
  • cache AD expressions within some of the distribution expressions (see optimization)
    • potential issue: multiple chaining => multi-threading => race condition since AD expressions built by making copies of the underlying AD variables which will make them point to the original variable. Potential fix: make copies of model expressions for each thread and each copy has its own independent AD variables (do something in the copy constructor to make this happen).
  • multiple chains/cores
  • implement ESS: blog stan
  • exceptions for non-activated models before calling inference models are pretty small, so inference can just activate.
  • adaptive metropolis moved to later issue
  • gibbs sampling moved to later issue

Optimization:

  • sin(x+y) * cos(x+y) will recompute x+y twice. Think about having transformed parameters like STAN to do something like (w = x+y, y |= ppl::normal(w, 1.)); This optimization at the user-level that cannot be predicted or optimized from the library any further. User definitely has a say in how to optimize expressions.

- More type safety has been added in traits
- Model ad_log_pdfs and variable expression to_ad member functions
  allow users to pass in cache in case these expressions need them.
- Dot product finally implemented (performance is still great)
- NUTS creates long cache vector (the extra memory for adj and values
  may not be necessary)
- more unittests with dot product
@JamesYang007 JamesYang007 marked this pull request as ready for review July 18, 2020 04:59
@JamesYang007 JamesYang007 merged commit cb28ae6 into master Jul 18, 2020
@JamesYang007 JamesYang007 deleted the james.yang/var_vec_mat branch July 20, 2020 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for multivariate samples and distributions DataWrapper class to view data
1 participant