Description Usage Arguments Value Examples
Title Posterior density of solution manifold points
1 | post_density_solmfd(X, prob_density, points, k, h = 1, prior = "gaussian", ...)
|
X |
matrix(n*m) input data with n samples in m dimension |
prob_density |
function of data and parameters |
points |
matrix (N * d) points obtained in solution manifold. N samples in d dim |
k |
function kernel function. |
h |
double normalizer. default = 1 |
prior |
str prior distribution. either "gaussian" or "uniform"/ |
... |
additional parameter for prior |
vector (N) vector(i) is density of ith row of points
1 2 3 4 5 6 7 8 9 10 11 12 | set.seed(10)
k = get("dnorm", mode = 'function')
prob_density = function(x, theta) {return(dnorm(x, mean = theta[[1]], sd = theta[[2]]))}
n = 100
X = rnorm(n, 1.5, 3)
s = 1
N = 10
d = 2
phi = function(x) {return(pnorm(2, x[[1]], x[[2]]) - pnorm(-5, x[[1]], x[[2]]) - 0.5)}
points = sol_mfd_points(N, phi, d, s, prior = "uniform")
res_with_density = post_density_solmfd(X, prob_density, points, k)
head(res_with_density)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.