cal2norm {TSLA}R Documentation

Calculate group norms

Description

Function to output group norms on the gamma coefficients based on g_idx and C2 matrix.

Usage

cal2norm(u, g_idx, type)

Arguments

u

C2*gamma.coef, gamma.coef is the estimated node coefficient vector, C2 matrix is the output from function get_tree_object(), which gives the weights of the groups.

g_idx

Group structure matrix defined by the C2 matrix. See details in get_tree_object().

type

If type == 1, return sum of group norms; else return individual norm for each group.

Value

Sum of group norms or individual group norms.


[Package TSLA version 0.1.2 Index]