Learn R Programming

OSNMTF (version 0.1.0)

MSR: Mean Residue

Description

To calculate mean residue of a sub-matrix block of W, indexed by a row cluster and a column cluster

Usage

MSR(Block)

Arguments

Block

The sub-matrix block of W, indexed by a row cluster and a column cluster

Value

The mean residue of the block

Examples

Run this code
# NOT RUN {
W <- simu_data_generation()
OSNMTF_res <- OSNMTF(W,k=5,l=4)
row_cluster <- OSNMTF_res[[2]][[1]]
column_cluster <- OSNMTF_res[[2]][[2]]
temp_rows <- which(row_cluster==1,TRUE)
temp_cols <- which(column_cluster==1,TRUE)
MSR_value <- MSR(W[temp_rows,temp_cols])
# }

Run the code above in your browser using DataLab