Learn R Programming

⚠️There's a newer version (0.5-6) of this package.Take me there.

hitandrun (version 0.5-5)

"Hit and Run" and "Shake and Bake" for Sampling Uniformly from Convex Shapes

Description

The "Hit and Run" Markov Chain Monte Carlo method for sampling uniformly from convex shapes defined by linear constraints, and the "Shake and Bake" method for sampling from the boundary of such shapes. Includes specialized functions for sampling normalized weights with arbitrary linear constraints.

Copy Link

Version

Install

install.packages('hitandrun')

Monthly Downloads

1,079

Version

0.5-5

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Gert Valkenhoef

Last Published

January 8th, 2019

Functions in hitandrun (0.5-5)

simplex.createConstraints

Create constraints that define the (n-1)-simplex
findVertices

Find vertices of the polytope
harConstraints

Constraint formulation utility functions
hitandrun

"Hit and Run" sampler
hypersphere.sample

Sample uniformly from an n-hypersphere
createSeedPoint

Generate a seed point
createTransform

Create transformation matrices
har

"Hit and Run" sampler
hitandrun-package

"Hit and Run" sampling
bbReject

Bounding box rejection sampler
eliminateRedundant

Eliminate redundant linear constraints
findExtremePoints

Find extreme points
createBoundBox

Calculate a bounding box
sab

"Shake and Bake" sampler
shakeandbake

"Shake and Bake" sampler
findFace

Find the closest face (constraint) to an interior point of a polytope.
findInteriorPoint

Find an interior point
simplex.sample

Sample uniformly from a simplex
solution.basis

Calculate the basis for the solution space of a system of linear equations
transformConstraints

Apply a transformation to a set of linear constraints.
simplex.createTransform

Transform points on an (n-1)-simplex to n-dimensional space