Metropois-Hastings(MH) Monte Carlo Integral
예제
mh_integral_01
: 의 MonteCarloIntegration 패키지의 값과 수치적분 비교
아래 (1),(2),(3)의 각각에 대해 MH Monte Carlo 적분
g (generic function with 1 method)
MonteCarloIntegration::vegas와 HCubature::hcubature 의 적분값 비교
mh_integral_01 (generic function with 1 method)
"MonteCarlo Package Integral"
0.13878
"Numerical Integration"
0.138401
Metropolis-Hasting function 정의
mh_integral (generic function with 1 method)
mh_integral_02 (generic function with 1 method)
"val"
0.134474
"C"
1
"err"
0.000692354
mh_integral_03 (generic function with 1 method)
"val"
0.137867
"C"
0.879355
"err"
0.000890163
mh_integral_04 (generic function with 1 method)
"val"
0.139924
"C"
0.922018
"err"
0.000634396
C 값을 MH로 구하고 적분하기
mh_integral_05_C (generic function with 1 method)
"C"
0.916533
"C_vegas "
0.924524
mh_integral_05 (generic function with 1 method)
"val"
0.139219
"C"
0.924819
"err"
0.000640663