R/likelihood_function.R
LikelihoodFunction.RdCollecting the fitted cluster parameters and number of datapoints associated with each parameter a likelihood can be calculated. Each cluster is weighted by the number of datapoints assigned.
LikelihoodFunction(dpobj, ind)A function f(x) that represents the Likelihood of the dpobj.
y <- rnorm(10)
dp <- DirichletProcessGaussian(y)
dp <- Fit(dp, 5)
f <- LikelihoodFunction(dp)
plot(f(-2:2))