Skip to contents

R6 class for a zero-inflated normal-block model with a fixed number of clusters (but unknown clustering).

Super classes

NormalBlockBase -> NormalBlockVarBase -> ZINormalBlockVarUnknownClusters

Active bindings

var_par

a list with variational parameters

model_par

the parameters of NormalBlockVarBase (B, B0, dm1, Omega), plus kappa (zero-inflation probabilities) and alpha (cluster proportions)

Methods

Inherited methods


ZINormalBlockVarUnknownClusters$new()

Create a new ZINormalBlockVarUnknownClusters object.

Usage

ZINormalBlockVarUnknownClusters$new(
  data,
  q,
  sparsity = 0,
  control = NB_control()
)

Arguments

data

object of NormalBlockVarData class, with responses and design matrix

q

required number of groups

sparsity

to apply on variance matrix when calling GLASSO

control

structured list of more specific parameters

Returns

A new ZINormalBlockVarUnknownClusters object


ZINormalBlockVarUnknownClusters$clone()

The objects of this class are cloneable with this method.

Usage

ZINormalBlockVarUnknownClusters$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

ex <- generate_normal_block_var_data(n = 50, p = 20, d = 1, q = 3, kappa = rep(0.3, 20))
data <- NormalBlockData$new(ex$Y, ex$X)
model <- normal_block(data, blocks = 3, zero_inflation = TRUE,
                      control = NB_control(verbose = FALSE))
model$clustering
#>  [1] 2 3 2 2 3 1 2 3 1 2 1 1 1 2 1 2 1 2 2 3