ogc_categoricalResponse: Variational Bayesian inference for outcome-guided clustering...

Description Usage Arguments Value References

View source: R/ogc_categorical_response.R

Description

This function allows you do semi-supervised clustering using variational Bayesian inference, when the response variable y is discrete.

Usage

1
2
3
ogc_categoricalResponse(X, K, y, prior, R = 0, ms = F, vs = F,
  labels_init, kmeans_init = F, tol = 1e-19, maxiter = 2000,
  verbose = F, indep = T)

Arguments

X

NxD data matrix

K

(Maximum) number of clusters

y

Vector of response variables of length N.

prior

Prior hyperparameters (optional).

R

Number of categories in y.

ms

Boolean flag that indicates whether model selection is required or not. Default is FALSE.

vs

Boolean flag that indicates whether variable selection is required or not. Default is FALSE.

labels_init

User-defined initial cluster labels (can be empty).

kmeans_init

Boolean flag, which, if TRUE, initializes the cluster labels with the k-means algorithm. Default is FALSE.

tol

Tolerance for stopping criterion. Default is 10e-20.

maxiter

Maximum number of iterations. Default is 2000.

verbose

Boolean flag which, if TRUE, prints the iteration number. Default is FALSE.

indep

Boolean flag which determines whether the covariates are considered as independent or not. Default is TRUE.

Value

A list containing L, the lower bound at each step of the algorithm, label, a vector containing the cluster labels, model, a list containing the trained model structure, and a vector called n_ comp which, if model selection is required, contains the number of mixture components at every step of the VB algorithm.

References

Pattern Recognition and Machine Learning by Christopher M. Bishop


acabassi/variational-ogc documentation built on May 23, 2019, 2:45 p.m.