averaging_matrix: Build averaging matrix from character vector of condition...

Description Usage Arguments Details Value

View source: R/averaging_matrix.R

Description

Let X be a data matrix (n_features by n_obs), in which each column j is a pattern vector for observation j, which belongs to class g. Applying the averaging matrix A to X computes the class-mean matrix, X_bar (n_features by n_classes), in which each column is the mean pattern for class g.

Usage

1

Arguments

conditions

character vector of length n_obs that indicates the condition or class to which each observation belongs.

Details

NB: this function calls indicator(), which alphabetically sorts the columns of the output.

Value

matrix X_bar (n_features by n_classes)


mcfreund/mfutils documentation built on Feb. 6, 2022, 4:57 a.m.