dmm.JNonConjugateModel: Create a nonconjugate model using Julia fucntions

Description Usage Arguments Value Examples

View source: R/dmm_model.R

Description

Create an model object to be used in the dmm.cluster function, using user given Julia functions. Must call dmm.addfile to import files, in which the Julia functions are stored, before using dmm.cluster on a JModel. Functions dmm.JModel and dmm.model are alternatives..

Usage

1
2
dmm.addfile(filename)
model <- dmm.model(pdf_name, sample_name, marg_name, params, isconjugate=TRUE)

Arguments

pdf_name

A string. The name of the Julia function in filename that returns the probability density function likelihood. The function should be of the form pdf_name(y::Float64, theta::Tuple, params::Tuple) or pdf_name(y::Array{Float64,1}, theta::Tuple, params::Tuple).

sample_name

A string. The name of the Julia function in filename that returns the sample prior. The function should be of the form sample_name(y::Float64, params::Tuple), sample_name(y::Array{Float64,1}, params::Tuple) or sample_name(y::Array{Float64,2}, params::Tuple).

params

A list of all hyperparameters needed for the above three functions.

Value

A model object of type JModel which can be passed to dmm.cluster.

Examples

1
2
3
4
5
dmm.addfile(filename)
# The following all make nonconjugate models using Julia functions
model <- dmm.model(pdf_name, sample_name, params, isconjugate=FALSE)
model <- dmm.Jmodel(pdf_name, sample_name, params, isconjugate=FALSE)
model <- dmm.JNonConjugateModel(pdf_name, sample_name, params)

nsdumont/jDirichletMixtureModels documentation built on May 23, 2019, 2:51 p.m.