Conversation
5bb3dd7 to
9be4f78
Compare
906e119 to
f1abc36
Compare
…tribution. Added support for basic uniform samplers.
…tribution. Added support for gaussian and exponential distributions
…tribution. Added support for logconcave distributions (reflected hmc & nuts samplers)
…tribution. Added support for logconcave distributions (crhmc)
7ffa98c to
99cbba6
Compare
|
|
||
| auto accelerated_billiard_walk(HPolytopeType& HP, RNGType& rng, unsigned int walk_len, unsigned int num_points) | ||
| { | ||
| typedef RandomPointGenerator<AcceleratedBilliardWalkType> Generator; |
| //HP.print(); | ||
| //std::cout<<"\n"; |
|
|
||
| auto start = std::chrono::steady_clock::now(); | ||
|
|
||
| sample_points<64>(HP, q, walk, distr, rng, walk_len, rnum, nburns, samples); |
|
|
||
| Point p = starting_point; | ||
|
|
||
| //TODO: burnin for nuts |
There was a problem hiding this comment.
Why burnin is difficult for nuts?
| template <typename NT> | ||
| static NT compute(HPolytope<Point> const& P) | ||
| { | ||
| return NT(2) * std::sqrt(NT(P.dimension())) * P.InnerBall().second; |
There was a problem hiding this comment.
I think we should call ComputeInnerBall() from the Polytope.
We have a flag in Hpolytope that checks if the innerball is already computed in ComputeInnerBall().
If the ball isn't computed then InnerBall() will trigger a runntime error.
I would probably add a todo to do the same check in InnerBall() as well and if the ball is not computed then we call ComputeInnerBall() in InnerBall(). Or we could delete InnerBall() and rename the ComputeInnerBall() to InnerBall().
| @@ -346,7 +346,7 @@ struct AcceleratedBilliardWalk | |||
| pointset.push_back(_p); | |||
| NT rad = NT(0), max_dist, Lmax = get_delta(), radius = P.InnerBall().second; | |||
There was a problem hiding this comment.
Plz call ComputeInnerBall() (see my previous comment)
| MT A = P.get_mat(); | ||
| VT b = P.get_vec(), _vec_point = VT::Zero(P.dimension()), p0 = p.getCoefficients(); | ||
| NT r = P.ComputeInnerBall().second; | ||
| NT r = P.InnerBall().second; |
There was a problem hiding this comment.
Plz call ComputeInnerBall() (see my previous comment)
| VT b = P.get_vec(), _vec_point = VT::Zero(P.dimension()), p0 = p.getCoefficients(); | ||
| NT r = params.set_L ? params.m_L | ||
| : P.ComputeInnerBall().second; | ||
| : P.InnerBall().second; |
There was a problem hiding this comment.
Plz call ComputeInnerBall() (see my previous comment)
| MT A = P.get_mat(); | ||
| VT b = P.get_vec(), _vec_point = VT::Zero(P.dimension()), p0 = p.getCoefficients(); | ||
| NT r = P.ComputeInnerBall().second; | ||
| NT r = P.InnerBall().second; |
There was a problem hiding this comment.
Plz call ComputeInnerBall() (see my previous comment)
| VT b = P.get_vec(), _vec_point = VT::Zero(P.dimension()), p0 = p.getCoefficients(); | ||
| NT r = params.set_L ? params.m_L | ||
| : P.ComputeInnerBall().second; | ||
| : P.InnerBall().second; |
There was a problem hiding this comment.
Plz call ComputeInnerBall() (see my previous comment)
| MT A = P.get_mat(); | ||
| VT b = P.get_vec(), _vec_point = VT::Zero(P.dimension()), p0 = p.getCoefficients(); | ||
| NT r = P.ComputeInnerBall().second; | ||
| NT r = P.InnerBall().second; |
There was a problem hiding this comment.
Plz call ComputeInnerBall() (see my previous comment)
| VT b = P.get_vec(), _vec_point = VT::Zero(P.dimension()), p0 = p.getCoefficients(); | ||
| NT r = params.set_L ? params.m_L | ||
| : P.ComputeInnerBall().second; | ||
| : P.InnerBall().second; |
There was a problem hiding this comment.
Plz call ComputeInnerBall() (see my previous comment)
Function is parameterized by walk and distribution. Added support for
basic uniformall samplers.