Skip to content

Commit

Permalink
James.yang/var vec mat (#37)
Browse files Browse the repository at this point in the history
* Move expr_builder inside expression

* In progress of modifying var vec mat

* Separating param/data with var/vec

* Draft of data and param with corresponding traits

* Refactored everything except mcmc including tests

* Add integration test for subscripting vec-like params

* Rename to integration test and combine all expression tests into one executable

* Add support for metropolis hastings

* Restore test cases to original sample size

* Add support for NUTS

* Fix small syntax in examples

* Fix uninitialized value issue in sampler_tools test

* Try generating and saving the value

* Try initializing member arrays in ctor

* Using c++20 style implementation of identity

* Activate model!

* Add test cases for min and max edge cases

* Resolve some TODOs

* Clean up traits related files

* Fix syntax for storage

* Fix pdf to have same API as log_pdf

* Fix header includes

* Add dot product, cached AD vars, stronger concepts

- 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

* Optimize NUTS to allocate less memory for cache variables

* Reorganized examples, write up design doc, and clean up type safety in binop

* More complicated regression example

* Add more comments and complete type check on all classes. Fix really really important bug in dot

* Move activate and activate_cache outside of mcmc

* Modify test to use cache

* Apply caching for normal and uniform

* Modify mcmc algorithms with different activate API

* Add support for bernoulli ad expression

* Remove gcc no warning flag and static cast void unused lambdas

* Add python script to compute true answers for nuts unittests and modified to have universal tolerance lvl

* Add support for normal diag covariance

* Change seed and reset tol to 0.05

* Add more comments and higher tol

* Increase tol even more

* Change seed to 1 and tol to 0.7

* Change seed to 0 and tol to 0.7

* Remove universal tol lvl

* Increase tol for std normal and stddev vector case

* Add autocorrelation

* Add improved autocorrelation statistic and finish ESS

* Add ESS information in regression ex

* Add overload of ess for 1 chain case

* Fix expression builder for operator, and operator|= and dot to convert params to viewers

* Modify NUTS to output timed results and finish README!!

* Add disclaimer

* Change some numbers to hit an if statement
  • Loading branch information
JamesYang007 committed Jul 18, 2020
1 parent 13c9118 commit cb28ae6
Show file tree
Hide file tree
Showing 113 changed files with 8,242 additions and 3,088 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Expand Up @@ -5,7 +5,6 @@ project("autoppl"
LANGUAGES C CXX)

option(AUTOPPL_ENABLE_TEST "Enable unit tests to be built." ON)
# TODO: later when we make benchmarks, this should be ON
option(AUTOPPL_ENABLE_BENCHMARK "Enable benchmarks to be built." OFF)
option(AUTOPPL_ENABLE_TEST_COVERAGE "Build with test coverage (AUTOPPL_ENABLE_TEST must be ON)" OFF)
option(AUTOPPL_ENABLE_EXAMPLE "Enable compilation of examples." OFF)
Expand Down Expand Up @@ -72,5 +71,5 @@ endif()

# Compile examples if enabled
if (AUTOPPL_ENABLE_EXAMPLE)
add_subdirectory(${PROJECT_SOURCE_DIR}/docs/example ${PROJECT_BINARY_DIR}/example)
add_subdirectory(${PROJECT_SOURCE_DIR}/example ${PROJECT_BINARY_DIR}/example)
endif()

0 comments on commit cb28ae6

Please sign in to comment.