sugsclustMargcpp: A C++ accelerated version of sugsclusterMarg

Description Usage Arguments Value

Description

A C++ accelerated version of sugsclusterMarg

Usage

1
sugsclustMargcpp(x, K, i, D, n, betaHat, phi, m, nu, S, lambda, intfeature)

Arguments

x

A numeric vector containing data of the observation

K

An integer specifiying the number of clusters

i

An integer specifying the current iteration of SUGS algorithm

D

An integer specifiying the number of variables

n

A numeric vector contain the number of people already allocated to each cluster

betaHat

A numeric vector containing the grid of hyperpriors for the dirichlet concentration parameter

phi

A numeric matrix containing the weights for the dirichlet hyperpiors

m

A numeric matrix containing the means for each component

nu

A numeric vector containg the degrees of freedom for each component

S

A numeric matrix containing the scale prior for each component

lambda

A numeric vector containing the mean variance hyperparamter for each component

intfeature

A binary vector of feature which are parition as irrelevant (0) or relevant (1).

Value

An arma::vec containg the probability that observation x belongs to each component


ococrook/sugsvarsel documentation built on May 27, 2019, 12:12 p.m.