get.fitted.leaf: Returs the leaf for each sample

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/get.fitted.leaf.R

Description

Taking as input a tree and data, this function determines the leaf each sample will fall in.

Usage

1
get.fitted.leaf(c5Tree, inpDTemp, epsi = 10^(-7))

Arguments

c5Tree

A decision tree of class C50 that uses module eigengenes, or NULL. If NULL, expression plots for all modules are created.

inpDTemp

The possibly new data matrix with samples on rows

epsi

A small perturbation to resolve the boundary issue

Value

A numeric vector of node indices named by samples (rows of inpDTemp)

Note

This function is tricky because C50 uses a global variable.

Author(s)

Amir Foroushani

See Also

Pigengene-package, make.decision.tree, compact.tree, compute.pigengene, module.heatmap, get.used.features, preds.at

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
     ## Data:
     data(aml)
     data(mds)
     data(pigengene)
     d1 <- rbind(aml,mds)

     ## Fiting the trees:
     trees <- make.decision.tree(pigengene=pigengene, Data=d1,
     saveDir="trees", minPerLeaf=15, doHeat=FALSE,verbose=3,
       toCompact=FALSE)
     f1 <- get.fitted.leaf(c5Tree=trees$c5Trees[["15"]], 
       inpDTemp=pigengene$eigengenes)

Pigengene documentation built on Nov. 8, 2020, 6:47 p.m.