build_moduleR_heuristic: Build regression tree with splits are detemined by K-means...

Description Usage Arguments Value Examples

View source: R/build_module.R

Description

Build regression tree based on Gaussian Likelihood score. The spliting of the tree is determined heuristicly by k_means.

Usage

1
2
3
4
5
6
7
8
build_moduleR_heuristic(
  X,
  Y,
  max_depth,
  cor_cutoff,
  min_divide_size,
  split_table
)

Arguments

X

A n by p matrix as input.

Y

A n by q matrix as response.

max_depth

Maximum depth of the tree.

cor_cutoff

Cutoff for within group Pearson correlation coefficient, if all data belong to a node have average correlation greater or equal to this, the node would not split anymore.

min_divide_size

Minimum number of data belong to a node allowed for further split of the node.

split_table

split table generated by K-means with build_split_table()

Value

A matrix for sample informatrion for each tree level. First column is feature index used by the node and second is the value used to split, the rest of the columns are the split of sample: 0 means less or equal, 1 means greater and -1 means the sample does not belong to this node.

Examples

1
2
3
X <- matrix(rnorm(5*10),5,10)
build_moduleR_heuristic(X = X, Y = matrix(rnorm(5*10),5,10),max_depth=3,cor_cutoff=0.9,
                        min_divide_size=3,split_table = build_split_table(X))

jianlin-cheng/GNET2 documentation built on Oct. 22, 2020, 11:24 p.m.