Skip to contents

R6 class for a Normal-Block-Mean model with a known clustering.

Super classes

NormalBlockBase -> NormalBlockMeanBase -> NormalBlockMeanKnownClusters

Active bindings

fitted

Y values predicted by the model, in Y's original units

who_am_I

a method to print what model is being fitted

Methods

Inherited methods


NormalBlockMeanKnownClusters$new()

Create a new [`NormalBlockMeanKnownClusters`] object.

Usage

NormalBlockMeanKnownClusters$new(data, C, sparsity = 0, control = NB_control())

Arguments

data

object of NormalBlockData class, with responses and design matrix

C

clustering matrix C_jk = 1 if species j belongs to cluster k

sparsity

to apply on variance matrix when calling GLASSO

control

structured list of more specific parameters, to generate with NB_control

Returns

A new [`NormalBlockMeanKnownClusters`] object


NormalBlockMeanKnownClusters$clone()

The objects of this class are cloneable with this method.

Usage

NormalBlockMeanKnownClusters$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

ex <- generate_normal_block_mean_data(n = 50, p = 20, d = 1, q = 3)
data <- NormalBlockData$new(ex$Y, ex$X)
model <- normal_block(data, blocks = ex$parameters$C, model = "mean")
#> Fitting a diagonal normal-block-mean model with fixed blocks 
#> 
#> DONE
model$plot()