metropolis_hastings
metropolis_hastings(unnorm_distr, next_sample, x0, num_samples=100)
Finds intersection, union or subtraction of two triangle meshes.
Given two triangle meshes dA and dB, uses exact predicates to compute the intersection, union or subtraction of the two solids A and B, and output its surface dC
Parameters:
Name | Type | Description | Default |
---|---|---|---|
unnorm_distr |
func
|
Function returning the value of the known function which is proportional to the desired distribution density |
required |
next_sample |
func
|
Function returning a candidate next sample from the current |
required |
x0 |
numpy array
|
Initial sample |
required |
num_samples |
int
|
Number of samples in output (this will be more than the total number of considered samples or evaluations of unnorm_distr) |
100
|
Returns:
Name | Type | Description |
---|---|---|
S |
numpy double array
|
Matrix sequence of samples |
F |
numpy int array
|
Vector of f evaluated at each row of S |
Examples:
TO-DO
Source code in src/gpytoolbox/metropolis_hastings.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|