get.fitted.leaf {Pigengene} | R Documentation

## Returs the leaf for each sample

### Description

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

### Usage

    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

         ## 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)

[Package Pigengene version 1.13.14 Index]